2011-01-05 Michael Snyder <msnyder@vmware.com>

* cli/cli-cmds.c: Shorten lines of >= 80 columns.
	* cli/cli-decode.c: Ditto.
	* cli/cli-dump.c: Ditto.
	* cli/cli-logging.c: Ditto.
	* cli/cli-script.c: Ditto.
	* cli/cli-setshow.c: Ditto.
	* common/signals.c: Ditto.
	* mi/mi-cmd-break.c: Ditto.
	* mi/mi-cmd-disas.c: Ditto.
	* mi/mi-cmd-stack.c: Ditto.
	* mi/mi-cmd-var.c: Ditto.
	* mi/mi-cmds.c: Ditto.
	* mi/mi-common.h: Ditto.
	* mi/mi-console.c: Ditto.
	* mi/mi-interp.c: Ditto.
	* mi/mi-main.c: Ditto.
	* osf-share/cma_attr.c: Ditto.
	* osf-share/cma_deb_core.h: Ditto.
	* osf-share/cma_debug_client.h: Ditto.
	* osf-share/cma_handle.h: Ditto.
	* osf-share/cma_mutex.h: Ditto.
	* osf-share/cma_stack_int.h: Ditto.
	* osf-share/cma_tcb_defs.h: Ditto.
	* python/py-auto-load.c: Ditto.
	* python/py-breakpoint.c: Ditto.
	* python/py-cmd.c: Ditto.
	* python/py-frame.c: Ditto.
	* python/py-objfile.c: Ditto.
	* python/py-param.c: Ditto.
	* python/py-progspace.c: Ditto.
	* python/py-symbol.c: Ditto.
	* python/py-value.c: Ditto.
	* python/python-internal.h: Ditto.
	* python/python.c: Ditto.
	* tui/tui-data.c: Ditto.
	* tui/tui-disasm.c: Ditto.
	* tui/tui-hooks.c: Ditto.
	* tui/tui-io.c: Ditto.
	* tui/tui-layout.c: Ditto.
	* tui/tui-regs.c: Ditto.
	* tui/tui-source.c: Ditto.
	* tui/tui-stack.c: Ditto.
	* tui/tui-win.c: Ditto.
	* tui/tui-windata.c: Ditto.
	* tui/tui-winsource.c: Ditto.
This commit is contained in:
Michael Snyder 2011-01-06 00:57:05 +00:00
parent 493e2a69a4
commit 9a2b4c1ba7
46 changed files with 428 additions and 226 deletions

View File

@ -151,6 +151,54 @@
* xml-syscall.c: Ditto. * xml-syscall.c: Ditto.
* xml-tdesc.c: Ditto. * xml-tdesc.c: Ditto.
2011-01-05 Michael Snyder <msnyder@vmware.com>
* cli/cli-cmds.c: Shorten lines of >= 80 columns.
* cli/cli-decode.c: Ditto.
* cli/cli-dump.c: Ditto.
* cli/cli-logging.c: Ditto.
* cli/cli-script.c: Ditto.
* cli/cli-setshow.c: Ditto.
* common/signals.c: Ditto.
* mi/mi-cmd-break.c: Ditto.
* mi/mi-cmd-disas.c: Ditto.
* mi/mi-cmd-stack.c: Ditto.
* mi/mi-cmd-var.c: Ditto.
* mi/mi-cmds.c: Ditto.
* mi/mi-common.h: Ditto.
* mi/mi-console.c: Ditto.
* mi/mi-interp.c: Ditto.
* mi/mi-main.c: Ditto.
* osf-share/cma_attr.c: Ditto.
* osf-share/cma_deb_core.h: Ditto.
* osf-share/cma_debug_client.h: Ditto.
* osf-share/cma_handle.h: Ditto.
* osf-share/cma_mutex.h: Ditto.
* osf-share/cma_stack_int.h: Ditto.
* osf-share/cma_tcb_defs.h: Ditto.
* python/py-auto-load.c: Ditto.
* python/py-breakpoint.c: Ditto.
* python/py-cmd.c: Ditto.
* python/py-frame.c: Ditto.
* python/py-objfile.c: Ditto.
* python/py-param.c: Ditto.
* python/py-progspace.c: Ditto.
* python/py-symbol.c: Ditto.
* python/py-value.c: Ditto.
* python/python-internal.h: Ditto.
* python/python.c: Ditto.
* tui/tui-data.c: Ditto.
* tui/tui-disasm.c: Ditto.
* tui/tui-hooks.c: Ditto.
* tui/tui-io.c: Ditto.
* tui/tui-layout.c: Ditto.
* tui/tui-regs.c: Ditto.
* tui/tui-source.c: Ditto.
* tui/tui-stack.c: Ditto.
* tui/tui-win.c: Ditto.
* tui/tui-windata.c: Ditto.
* tui/tui-winsource.c: Ditto.
2011-01-05 Joel Brobecker <brobecker@adacore.com> 2011-01-05 Joel Brobecker <brobecker@adacore.com>
* configure.ac, gdb.1: Copyright year update. * configure.ac, gdb.1: Copyright year update.

View File

@ -221,7 +221,8 @@ error_no_arg (char *why)
static void static void
info_command (char *arg, int from_tty) info_command (char *arg, int from_tty)
{ {
printf_unfiltered (_("\"info\" must be followed by the name of an info command.\n")); printf_unfiltered (_("\"info\" must be followed by "
"the name of an info command.\n"));
help_list (infolist, "info ", -1, gdb_stdout); help_list (infolist, "info ", -1, gdb_stdout);
} }
@ -468,8 +469,8 @@ static void
show_script_ext_mode (struct ui_file *file, int from_tty, show_script_ext_mode (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value) struct cmd_list_element *c, const char *value)
{ {
fprintf_filtered (file, _("\ fprintf_filtered (file,
Script filename extension recognition is \"%s\".\n"), _("Script filename extension recognition is \"%s\".\n"),
value); value);
} }
@ -899,7 +900,8 @@ list_command (char *arg, int from_tty)
if (strcmp (arg, "-") == 0) if (strcmp (arg, "-") == 0)
{ {
print_source_lines (cursal.symtab, print_source_lines (cursal.symtab,
max (get_first_line_listed () - get_lines_to_list (), 1), max (get_first_line_listed ()
- get_lines_to_list (), 1),
get_first_line_listed (), 0); get_first_line_listed (), 0);
return; return;
} }
@ -1293,7 +1295,8 @@ ambiguous_line_spec (struct symtabs_and_lines *sals)
static void static void
set_debug (char *arg, int from_tty) set_debug (char *arg, int from_tty)
{ {
printf_unfiltered (_("\"set debug\" must be followed by the name of a debug subcommand.\n")); printf_unfiltered (_("\"set debug\" must be followed by "
"the name of a debug subcommand.\n"));
help_list (setdebuglist, "set debug ", -1, gdb_stdout); help_list (setdebuglist, "set debug ", -1, gdb_stdout);
} }
@ -1338,8 +1341,9 @@ show_info_verbose (struct ui_file *file, int from_tty,
const char *value) const char *value)
{ {
if (info_verbose) if (info_verbose)
fprintf_filtered (file, _("\ fprintf_filtered (file,
Verbose printing of informational messages is %s.\n"), value); _("Verbose printing of informational messages is %s.\n"),
value);
else else
fprintf_filtered (file, _("Verbosity is %s.\n"), value); fprintf_filtered (file, _("Verbosity is %s.\n"), value);
} }
@ -1372,8 +1376,8 @@ static void
show_remote_timeout (struct ui_file *file, int from_tty, show_remote_timeout (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value) struct cmd_list_element *c, const char *value)
{ {
fprintf_filtered (file, _("\ fprintf_filtered (file,
Timeout limit to wait for target to respond is %s.\n"), _("Timeout limit to wait for target to respond is %s.\n"),
value); value);
} }
@ -1381,8 +1385,8 @@ static void
show_max_user_call_depth (struct ui_file *file, int from_tty, show_max_user_call_depth (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value) struct cmd_list_element *c, const char *value)
{ {
fprintf_filtered (file, _("\ fprintf_filtered (file,
The max call depth for user-defined commands is %s.\n"), _("The max call depth for user-defined commands is %s.\n"),
value); value);
} }
@ -1403,7 +1407,8 @@ These commands are subject to frequent change, and may not be as\n\
well documented as user commands."), well documented as user commands."),
&cmdlist); &cmdlist);
add_cmd ("obscure", class_obscure, NULL, _("Obscure features."), &cmdlist); add_cmd ("obscure", class_obscure, NULL, _("Obscure features."), &cmdlist);
add_cmd ("aliases", class_alias, NULL, _("Aliases of other commands."), &cmdlist); add_cmd ("aliases", class_alias, NULL,
_("Aliases of other commands."), &cmdlist);
add_cmd ("user-defined", class_user, NULL, _("\ add_cmd ("user-defined", class_user, NULL, _("\
User-defined commands.\n\ User-defined commands.\n\
The commands in this class are those defined by the user.\n\ The commands in this class are those defined by the user.\n\
@ -1616,7 +1621,8 @@ Lines can be specified in these ways:\n\
FUNCTION, to list around beginning of that function,\n\ FUNCTION, to list around beginning of that function,\n\
FILE:FUNCTION, to distinguish among like-named static functions.\n\ FILE:FUNCTION, to distinguish among like-named static functions.\n\
*ADDRESS, to list around the line containing that address.\n\ *ADDRESS, to list around the line containing that address.\n\
With two args if one is empty it stands for ten lines away from the other arg.")); With two args if one is empty it stands for ten lines away from \
the other arg."));
if (!xdb_commands) if (!xdb_commands)
add_com_alias ("l", "list", class_files, 1); add_com_alias ("l", "list", class_files, 1);

View File

@ -279,7 +279,8 @@ add_alias_cmd (char *name, char *oldname, enum command_class class,
containing that list. */ containing that list. */
struct cmd_list_element * struct cmd_list_element *
add_prefix_cmd (char *name, enum command_class class, void (*fun) (char *, int), add_prefix_cmd (char *name, enum command_class class,
void (*fun) (char *, int),
char *doc, struct cmd_list_element **prefixlist, char *doc, struct cmd_list_element **prefixlist,
char *prefixname, int allow_unknown, char *prefixname, int allow_unknown,
struct cmd_list_element **list) struct cmd_list_element **list)
@ -1378,7 +1379,8 @@ lookup_cmd (char **line, struct cmd_list_element *list, char *cmdtype,
for (c = local_list; c; c = c->next) for (c = local_list; c; c = c->next)
if (!strncmp (*line, c->name, amb_len)) if (!strncmp (*line, c->name, amb_len))
{ {
if (strlen (ambbuf) + strlen (c->name) + 6 < (int) sizeof ambbuf) if (strlen (ambbuf) + strlen (c->name) + 6
< (int) sizeof ambbuf)
{ {
if (strlen (ambbuf)) if (strlen (ambbuf))
strcat (ambbuf, ", "); strcat (ambbuf, ", ");

View File

@ -668,13 +668,13 @@ _initialize_cli_dump (void)
{ {
struct cmd_list_element *c; struct cmd_list_element *c;
add_prefix_cmd ("dump", class_vars, dump_command, _("\ add_prefix_cmd ("dump", class_vars, dump_command,
Dump target code/data to a local file."), _("Dump target code/data to a local file."),
&dump_cmdlist, "dump ", &dump_cmdlist, "dump ",
0/*allow-unknown*/, 0/*allow-unknown*/,
&cmdlist); &cmdlist);
add_prefix_cmd ("append", class_vars, append_command, _("\ add_prefix_cmd ("append", class_vars, append_command,
Append target code/data to a local file."), _("Append target code/data to a local file."),
&append_cmdlist, "append ", &append_cmdlist, "append ",
0/*allow-unknown*/, 0/*allow-unknown*/,
&cmdlist); &cmdlist);
@ -689,32 +689,32 @@ Write the value of an expression to a raw binary file.\n\
Arguments are FILE EXPRESSION. Writes the value of EXPRESSION to\n\ Arguments are FILE EXPRESSION. Writes the value of EXPRESSION to\n\
the specified FILE in raw target ordered bytes."); the specified FILE in raw target ordered bytes.");
add_prefix_cmd ("srec", all_commands, srec_dump_command, _("\ add_prefix_cmd ("srec", all_commands, srec_dump_command,
Write target code/data to an srec file."), _("Write target code/data to an srec file."),
&srec_cmdlist, "dump srec ", &srec_cmdlist, "dump srec ",
0 /*allow-unknown*/, 0 /*allow-unknown*/,
&dump_cmdlist); &dump_cmdlist);
add_prefix_cmd ("ihex", all_commands, ihex_dump_command, _("\ add_prefix_cmd ("ihex", all_commands, ihex_dump_command,
Write target code/data to an intel hex file."), _("Write target code/data to an intel hex file."),
&ihex_cmdlist, "dump ihex ", &ihex_cmdlist, "dump ihex ",
0 /*allow-unknown*/, 0 /*allow-unknown*/,
&dump_cmdlist); &dump_cmdlist);
add_prefix_cmd ("tekhex", all_commands, tekhex_dump_command, _("\ add_prefix_cmd ("tekhex", all_commands, tekhex_dump_command,
Write target code/data to a tekhex file."), _("Write target code/data to a tekhex file."),
&tekhex_cmdlist, "dump tekhex ", &tekhex_cmdlist, "dump tekhex ",
0 /*allow-unknown*/, 0 /*allow-unknown*/,
&dump_cmdlist); &dump_cmdlist);
add_prefix_cmd ("binary", all_commands, binary_dump_command, _("\ add_prefix_cmd ("binary", all_commands, binary_dump_command,
Write target code/data to a raw binary file."), _("Write target code/data to a raw binary file."),
&binary_dump_cmdlist, "dump binary ", &binary_dump_cmdlist, "dump binary ",
0 /*allow-unknown*/, 0 /*allow-unknown*/,
&dump_cmdlist); &dump_cmdlist);
add_prefix_cmd ("binary", all_commands, binary_append_command, _("\ add_prefix_cmd ("binary", all_commands, binary_append_command,
Append target code/data to a raw binary file."), _("Append target code/data to a raw binary file."),
&binary_append_cmdlist, "append binary ", &binary_append_cmdlist, "append binary ",
0 /*allow-unknown*/, 0 /*allow-unknown*/,
&append_cmdlist); &append_cmdlist);

View File

@ -61,8 +61,9 @@ static void
show_logging_overwrite (struct ui_file *file, int from_tty, show_logging_overwrite (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value) struct cmd_list_element *c, const char *value)
{ {
fprintf_filtered (file, _("\ fprintf_filtered (file,
Whether logging overwrites or appends to the log file is %s.\n"), _("Whether logging overwrites or "
"appends to the log file is %s.\n"),
value); value);
} }
@ -258,13 +259,12 @@ set_logging_off (char *args, int from_tty)
static void static void
set_logging_command (char *args, int from_tty) set_logging_command (char *args, int from_tty)
{ {
printf_unfiltered (_("\ printf_unfiltered (_("\"set logging\" lets you log output to a file.\n"
\"set logging\" lets you log output to a file.\n\ "Usage: set logging on [FILENAME]\n"
Usage: set logging on [FILENAME]\n\ " set logging off\n"
set logging off\n\ " set logging file FILENAME\n"
set logging file FILENAME\n\ " set logging overwrite [on|off]\n"
set logging overwrite [on|off]\n\ " set logging redirect [on|off]\n"));
set logging redirect [on|off]\n"));
} }
static void static void

View File

@ -1186,7 +1186,8 @@ read_command_lines (char *prompt_arg, int from_tty, int parse_commands,
if (deprecated_readline_begin_hook) if (deprecated_readline_begin_hook)
{ {
/* Note - intentional to merge messages with no newline. */ /* Note - intentional to merge messages with no newline. */
(*deprecated_readline_begin_hook) ("%s %s\n", prompt_arg, END_MESSAGE); (*deprecated_readline_begin_hook) ("%s %s\n", prompt_arg,
END_MESSAGE);
} }
else else
{ {
@ -1479,7 +1480,8 @@ define_command (char *comname, int from_tty)
hookc = 0; hookc = 0;
if (!hookc) if (!hookc)
{ {
warning (_("Your new `%s' command does not hook any existing command."), warning (_("Your new `%s' command does not "
"hook any existing command."),
comfull); comfull);
if (!query (_("Proceed? "))) if (!query (_("Proceed? ")))
error (_("Not confirmed.")); error (_("Not confirmed."));
@ -1517,7 +1519,8 @@ define_command (char *comname, int from_tty)
break; break;
case CMD_POST_HOOK: case CMD_POST_HOOK:
hookc->hook_post = newc; /* Target gets hooked. */ hookc->hook_post = newc; /* Target gets hooked. */
newc->hookee_post = hookc; /* We are marked as hooking target cmd. */ newc->hookee_post = hookc; /* We are marked as hooking
target cmd. */
break; break;
default: default:
/* Should never come here as hookc would be 0. */ /* Should never come here as hookc would be 0. */

View File

@ -352,7 +352,8 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
break; break;
default: default:
internal_error (__FILE__, __LINE__, internal_error (__FILE__, __LINE__,
_("do_setshow_command: invalid var_auto_boolean")); _("do_setshow_command: "
"invalid var_auto_boolean"));
break; break;
} }
break; break;

View File

@ -48,7 +48,8 @@ struct gdbarch;
# endif # endif
#endif #endif
/* This table must match in order and size the signals in enum target_signal. */ /* This table must match in order and size the signals in enum
target_signal. */
static const struct { static const struct {
const char *name; const char *name;
@ -348,7 +349,8 @@ target_signal_from_host (int hostsig)
return (enum target_signal) return (enum target_signal)
(hostsig - 64 + (int) TARGET_SIGNAL_REALTIME_64); (hostsig - 64 + (int) TARGET_SIGNAL_REALTIME_64);
else else
error ("GDB bug: target.c (target_signal_from_host): unrecognized real-time signal"); error ("GDB bug: target.c (target_signal_from_host): "
"unrecognized real-time signal");
} }
#endif #endif

View File

@ -103,7 +103,8 @@ mi_cmd_break_insert (char *command, char **argv, int argc)
while (1) while (1)
{ {
int opt = mi_getopt ("mi_cmd_break_insert", argc, argv, opts, &optind, &optarg); int opt = mi_getopt ("mi_cmd_break_insert", argc, argv,
opts, &optind, &optarg);
if (opt < 0) if (opt < 0)
break; break;
switch ((enum opt) opt) switch ((enum opt) opt)

View File

@ -128,12 +128,12 @@ mi_cmd_disassemble (char *command, char **argv, int argc)
if (!((line_seen && file_seen && num_seen && !start_seen && !end_seen) if (!((line_seen && file_seen && num_seen && !start_seen && !end_seen)
|| (line_seen && file_seen && !num_seen && !start_seen && !end_seen) || (line_seen && file_seen && !num_seen && !start_seen && !end_seen)
|| (!line_seen && !file_seen && !num_seen && start_seen && end_seen))) || (!line_seen && !file_seen && !num_seen && start_seen && end_seen)))
error error ("mi_cmd_disassemble: Usage: ( [-f filename -l linenum [-n "
("mi_cmd_disassemble: Usage: ( [-f filename -l linenum [-n howmany]] | [-s startaddr -e endaddr]) [--] mixed_mode."); "howmany]] | [-s startaddr -e endaddr]) [--] mixed_mode.");
if (argc != 1) if (argc != 1)
error error ("mi_cmd_disassemble: Usage: [-f filename -l "
("mi_cmd_disassemble: Usage: [-f filename -l linenum [-n howmany]] [-s startaddr -e endaddr] [--] mixed_mode."); "linenum [-n howmany]] [-s startaddr -e endaddr] [--] mixed_mode.");
mixed_source_and_assembly = atoi (argv[0]); mixed_source_and_assembly = atoi (argv[0]);
if ((mixed_source_and_assembly != 0) && (mixed_source_and_assembly != 1)) if ((mixed_source_and_assembly != 0) && (mixed_source_and_assembly != 1))
@ -151,7 +151,8 @@ mi_cmd_disassemble (char *command, char **argv, int argc)
if (!find_line_pc (s, line_num, &start)) if (!find_line_pc (s, line_num, &start))
error (_("mi_cmd_disassemble: Invalid line number")); error (_("mi_cmd_disassemble: Invalid line number"));
if (find_pc_partial_function (start, NULL, &low, &high) == 0) if (find_pc_partial_function (start, NULL, &low, &high) == 0)
error (_("mi_cmd_disassemble: No function contains specified address")); error (_("mi_cmd_disassemble: "
"No function contains specified address"));
} }
gdb_disassembly (gdbarch, uiout, gdb_disassembly (gdbarch, uiout,

View File

@ -168,7 +168,8 @@ mi_cmd_stack_list_args (char *command, char **argv, int argc)
enum print_values print_values; enum print_values print_values;
if (argc < 1 || argc > 3 || argc == 2) if (argc < 1 || argc > 3 || argc == 2)
error (_("mi_cmd_stack_list_args: Usage: PRINT_VALUES [FRAME_LOW FRAME_HIGH]")); error (_("mi_cmd_stack_list_args: Usage: "
"PRINT_VALUES [FRAME_LOW FRAME_HIGH]"));
if (argc == 3) if (argc == 3)
{ {
@ -195,7 +196,8 @@ mi_cmd_stack_list_args (char *command, char **argv, int argc)
if (fi == NULL) if (fi == NULL)
error (_("mi_cmd_stack_list_args: Not enough frames in stack.")); error (_("mi_cmd_stack_list_args: Not enough frames in stack."));
cleanup_stack_args = make_cleanup_ui_out_list_begin_end (uiout, "stack-args"); cleanup_stack_args
= make_cleanup_ui_out_list_begin_end (uiout, "stack-args");
/* Now let's print the frames up to frame_high, or until there are /* Now let's print the frames up to frame_high, or until there are
frames in the stack. */ frames in the stack. */

View File

@ -41,7 +41,8 @@ static void varobj_update_one (struct varobj *var,
enum print_values print_values, enum print_values print_values,
int explicit); int explicit);
static int mi_print_value_p (struct varobj *var, enum print_values print_values); static int mi_print_value_p (struct varobj *var,
enum print_values print_values);
/* Print variable object VAR. The PRINT_VALUES parameter controls /* Print variable object VAR. The PRINT_VALUES parameter controls
if the value should be printed. The PRINT_EXPRESSION parameter if the value should be printed. The PRINT_EXPRESSION parameter
@ -180,7 +181,8 @@ mi_cmd_var_delete (char *command, char **argv, int argc)
if (argc == 1) if (argc == 1)
{ {
if (strcmp (name, "-c") == 0) if (strcmp (name, "-c") == 0)
error (_("mi_cmd_var_delete: Missing required argument after '-c': variable object name")); error (_("mi_cmd_var_delete: Missing required "
"argument after '-c': variable object name"));
if (*name == '-') if (*name == '-')
error (_("mi_cmd_var_delete: Illegal variable object name")); error (_("mi_cmd_var_delete: Illegal variable object name"));
} }
@ -232,7 +234,8 @@ mi_parse_format (const char *arg)
return FORMAT_OCTAL; return FORMAT_OCTAL;
} }
error (_("Must specify the format as: \"natural\", \"binary\", \"decimal\", \"hexadecimal\", or \"octal\"")); error (_("Must specify the format as: \"natural\", "
"\"binary\", \"decimal\", \"hexadecimal\", or \"octal\""));
} }
void void
@ -400,7 +403,8 @@ mi_cmd_var_list_children (char *command, char **argv, int argc)
char *display_hint; char *display_hint;
if (argc < 1 || argc > 4) if (argc < 1 || argc > 4)
error (_("mi_cmd_var_list_children: Usage: [PRINT_VALUES] NAME [FROM TO]")); error (_("mi_cmd_var_list_children: Usage: "
"[PRINT_VALUES] NAME [FROM TO]"));
/* Get varobj handle, if a valid var obj name was specified */ /* Get varobj handle, if a valid var obj name was specified */
if (argc == 1 || argc == 3) if (argc == 1 || argc == 3)
@ -617,7 +621,8 @@ mi_cmd_var_assign (char *command, char **argv, int argc)
expression = xstrdup (argv[1]); expression = xstrdup (argv[1]);
if (!varobj_set_value (var, expression)) if (!varobj_set_value (var, expression))
error (_("mi_cmd_var_assign: Could not assign expression to variable object")); error (_("mi_cmd_var_assign: Could not assign "
"expression to variable object"));
val = varobj_get_value (var); val = varobj_get_value (var);
ui_out_field_string (uiout, "value", val); ui_out_field_string (uiout, "value", val);
@ -793,7 +798,8 @@ varobj_update_one (struct varobj *var, enum print_values print_values,
{ {
struct cleanup *cleanup_child; struct cleanup *cleanup_child;
cleanup_child = make_cleanup_ui_out_tuple_begin_end (uiout, NULL); cleanup_child
= make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
print_varobj (child, print_values, 1 /* print_expression */); print_varobj (child, print_values, 1 /* print_expression */);
do_cleanups (cleanup_child); do_cleanups (cleanup_child);
} }

View File

@ -47,14 +47,17 @@ struct mi_cmd mi_cmds[] =
{ "break-watch", { NULL, 0 }, mi_cmd_break_watch}, { "break-watch", { NULL, 0 }, mi_cmd_break_watch},
{ "data-disassemble", { NULL, 0 }, mi_cmd_disassemble}, { "data-disassemble", { NULL, 0 }, mi_cmd_disassemble},
{ "data-evaluate-expression", { NULL, 0 }, mi_cmd_data_evaluate_expression}, { "data-evaluate-expression", { NULL, 0 }, mi_cmd_data_evaluate_expression},
{ "data-list-changed-registers", { NULL, 0 }, mi_cmd_data_list_changed_registers}, { "data-list-changed-registers", { NULL, 0 },
mi_cmd_data_list_changed_registers},
{ "data-list-register-names", { NULL, 0 }, mi_cmd_data_list_register_names}, { "data-list-register-names", { NULL, 0 }, mi_cmd_data_list_register_names},
{ "data-list-register-values", { NULL, 0 }, mi_cmd_data_list_register_values}, { "data-list-register-values", { NULL, 0 },
mi_cmd_data_list_register_values},
{ "data-read-memory", { NULL, 0 }, mi_cmd_data_read_memory}, { "data-read-memory", { NULL, 0 }, mi_cmd_data_read_memory},
{ "data-read-memory-bytes", { NULL, 0 }, mi_cmd_data_read_memory_bytes}, { "data-read-memory-bytes", { NULL, 0 }, mi_cmd_data_read_memory_bytes},
{ "data-write-memory", { NULL, 0 }, mi_cmd_data_write_memory}, { "data-write-memory", { NULL, 0 }, mi_cmd_data_write_memory},
{ "data-write-memory-bytes", {NULL, 0}, mi_cmd_data_write_memory_bytes}, { "data-write-memory-bytes", {NULL, 0}, mi_cmd_data_write_memory_bytes},
{ "data-write-register-values", { NULL, 0 }, mi_cmd_data_write_register_values}, { "data-write-register-values", { NULL, 0 },
mi_cmd_data_write_register_values},
{ "enable-timings", { NULL, 0 }, mi_cmd_enable_timings}, { "enable-timings", { NULL, 0 }, mi_cmd_enable_timings},
{ "enable-pretty-printing", { NULL, 0 }, mi_cmd_enable_pretty_printing}, { "enable-pretty-printing", { NULL, 0 }, mi_cmd_enable_pretty_printing},
{ "environment-cd", { NULL, 0 }, mi_cmd_env_cd}, { "environment-cd", { NULL, 0 }, mi_cmd_env_cd},
@ -75,8 +78,10 @@ struct mi_cmd mi_cmds[] =
{ "exec-until", { "until", 1 }, NULL}, { "exec-until", { "until", 1 }, NULL},
{ "file-exec-and-symbols", { "file", 1 }, NULL }, { "file-exec-and-symbols", { "file", 1 }, NULL },
{ "file-exec-file", { "exec-file", 1 }, NULL }, { "file-exec-file", { "exec-file", 1 }, NULL },
{ "file-list-exec-source-file", { NULL, 0 }, mi_cmd_file_list_exec_source_file}, { "file-list-exec-source-file", { NULL, 0 },
{ "file-list-exec-source-files", { NULL, 0 }, mi_cmd_file_list_exec_source_files }, mi_cmd_file_list_exec_source_file},
{ "file-list-exec-source-files", { NULL, 0 },
mi_cmd_file_list_exec_source_files },
{ "file-symbol-file", { "symbol-file", 1 }, NULL }, { "file-symbol-file", { "symbol-file", 1 }, NULL },
{ "gdb-exit", { NULL, 0 }, mi_cmd_gdb_exit}, { "gdb-exit", { NULL, 0 }, mi_cmd_gdb_exit},
{ "gdb-set", { "set", 1 }, NULL }, { "gdb-set", { "set", 1 }, NULL },

View File

@ -20,8 +20,9 @@
#ifndef MI_COMMON_H #ifndef MI_COMMON_H
#define MI_COMMON_H #define MI_COMMON_H
/* Represents the reason why GDB is sending an asynchronous command to the /* Represents the reason why GDB is sending an asynchronous command to
front end. NOTE: When modifing this, don't forget to update gdb.texinfo! */ the front end. NOTE: When modifing this, don't forget to update
gdb.texinfo! */
enum async_reply_reason enum async_reply_reason
{ {
EXEC_ASYNC_BREAKPOINT_HIT = 0, EXEC_ASYNC_BREAKPOINT_HIT = 0,

View File

@ -104,7 +104,8 @@ mi_console_raw_packet (void *data,
if (mi_console->quote) if (mi_console->quote)
{ {
fputs_unfiltered ("\"", mi_console->raw); fputs_unfiltered ("\"", mi_console->raw);
fputstrn_unfiltered (buf, length_buf, mi_console->quote, mi_console->raw); fputstrn_unfiltered (buf, length_buf,
mi_console->quote, mi_console->raw);
fputs_unfiltered ("\"\n", mi_console->raw); fputs_unfiltered ("\"\n", mi_console->raw);
} }
else else

View File

@ -196,10 +196,12 @@ mi_cmd_interpreter_exec (char *command, char **argv, int argc)
interp_to_use = interp_lookup (argv[0]); interp_to_use = interp_lookup (argv[0]);
if (interp_to_use == NULL) if (interp_to_use == NULL)
error ("mi_cmd_interpreter_exec: could not find interpreter \"%s\"", argv[0]); error ("mi_cmd_interpreter_exec: could not find interpreter \"%s\"",
argv[0]);
if (!interp_exec_p (interp_to_use)) if (!interp_exec_p (interp_to_use))
error ("mi_cmd_interpreter_exec: interpreter \"%s\" does not support command execution", error ("mi_cmd_interpreter_exec: interpreter \"%s\" "
"does not support command execution",
argv[0]); argv[0]);
/* Insert the MI out hooks, making sure to also call the interpreter's hooks /* Insert the MI out hooks, making sure to also call the interpreter's hooks
@ -231,11 +233,12 @@ mi_cmd_interpreter_exec (char *command, char **argv, int argc)
} }
/* /*
* mi_insert_notify_hooks - This inserts a number of hooks that are meant to produce * mi_insert_notify_hooks - This inserts a number of hooks that are
* async-notify ("=") MI messages while running commands in another interpreter * meant to produce async-notify ("=") MI messages while running
* using mi_interpreter_exec. The canonical use for this is to allow access to * commands in another interpreter using mi_interpreter_exec. The
* the gdb CLI interpreter from within the MI, while still producing MI style output * canonical use for this is to allow access to the gdb CLI
* when actions in the CLI command change gdb's state. * interpreter from within the MI, while still producing MI style
* output when actions in the CLI command change gdb's state.
*/ */
static void static void

View File

@ -240,7 +240,9 @@ exec_continue (char **argv, int argc)
if (!current_context->all) if (!current_context->all)
{ {
struct inferior *inf = find_inferior_id (current_context->thread_group); struct inferior *inf
= find_inferior_id (current_context->thread_group);
pid = inf->pid; pid = inf->pid;
} }
iterate_over_threads (proceed_thread_callback, &pid); iterate_over_threads (proceed_thread_callback, &pid);
@ -830,7 +832,8 @@ mi_cmd_list_thread_groups (char *command, char **argv, int argc)
else if (strcmp (optarg, "1") == 0) else if (strcmp (optarg, "1") == 0)
recurse = 1; recurse = 1;
else else
error ("only '0' and '1' are valid values for the '--recurse' option"); error ("only '0' and '1' are valid values "
"for the '--recurse' option");
break; break;
} }
} }
@ -981,7 +984,8 @@ mi_cmd_data_list_changed_registers (char *command, char **argv, int argc)
continue; continue;
changed = register_changed_p (regnum, prev_regs, this_regs); changed = register_changed_p (regnum, prev_regs, this_regs);
if (changed < 0) if (changed < 0)
error ("mi_cmd_data_list_changed_registers: Unable to read register contents."); error ("mi_cmd_data_list_changed_registers: "
"Unable to read register contents.");
else if (changed) else if (changed)
ui_out_field_int (uiout, NULL, regnum); ui_out_field_int (uiout, NULL, regnum);
} }
@ -999,7 +1003,8 @@ mi_cmd_data_list_changed_registers (char *command, char **argv, int argc)
{ {
changed = register_changed_p (regnum, prev_regs, this_regs); changed = register_changed_p (regnum, prev_regs, this_regs);
if (changed < 0) if (changed < 0)
error ("mi_cmd_data_list_register_change: Unable to read register contents."); error ("mi_cmd_data_list_register_change: "
"Unable to read register contents.");
else if (changed) else if (changed)
ui_out_field_int (uiout, NULL, regnum); ui_out_field_int (uiout, NULL, regnum);
} }
@ -1058,7 +1063,8 @@ mi_cmd_data_list_register_values (char *command, char **argv, int argc)
upon the particular processor being debugged. */ upon the particular processor being debugged. */
if (argc == 0) if (argc == 0)
error ("mi_cmd_data_list_register_values: Usage: -data-list-register-values <format> [<regnum1>...<regnumN>]"); error ("mi_cmd_data_list_register_values: Usage: "
"-data-list-register-values <format> [<regnum1>...<regnumN>]");
format = (int) argv[0][0]; format = (int) argv[0][0];
@ -1160,7 +1166,8 @@ get_register (struct frame_info *frame, int regnum, int format)
/* Write given values into registers. The registers and values are /* Write given values into registers. The registers and values are
given as pairs. The corresponding MI command is given as pairs. The corresponding MI command is
-data-write-register-values <format> [<regnum1> <value1>...<regnumN> <valueN>]*/ -data-write-register-values <format>
[<regnum1> <value1>...<regnumN> <valueN>] */
void void
mi_cmd_data_write_register_values (char *command, char **argv, int argc) mi_cmd_data_write_register_values (char *command, char **argv, int argc)
{ {
@ -1180,7 +1187,8 @@ mi_cmd_data_write_register_values (char *command, char **argv, int argc)
numregs = gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch); numregs = gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch);
if (argc == 0) if (argc == 0)
error ("mi_cmd_data_write_register_values: Usage: -data-write-register-values <format> [<regnum1> <value1>...<regnumN> <valueN>]"); error ("mi_cmd_data_write_register_values: Usage: -data-write-register-"
"values <format> [<regnum1> <value1>...<regnumN> <valueN>]");
format = (int) argv[0][0]; format = (int) argv[0][0];
@ -1191,7 +1199,8 @@ mi_cmd_data_write_register_values (char *command, char **argv, int argc)
error ("mi_cmd_data_write_register_values: No regs and values specified."); error ("mi_cmd_data_write_register_values: No regs and values specified.");
if ((argc - 1) % 2) if ((argc - 1) % 2)
error ("mi_cmd_data_write_register_values: Regs and vals are not in pairs."); error ("mi_cmd_data_write_register_values: "
"Regs and vals are not in pairs.");
for (i = 1; i < argc; i = i + 2) for (i = 1; i < argc; i = i + 2)
{ {
@ -1231,7 +1240,8 @@ mi_cmd_data_evaluate_expression (char *command, char **argv, int argc)
if (argc != 1) if (argc != 1)
{ {
ui_out_stream_delete (stb); ui_out_stream_delete (stb);
error ("mi_cmd_data_evaluate_expression: Usage: -data-evaluate-expression expression"); error ("mi_cmd_data_evaluate_expression: "
"Usage: -data-evaluate-expression expression");
} }
expr = parse_expression (argv[0]); expr = parse_expression (argv[0]);
@ -1317,7 +1327,8 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
argc -= optind; argc -= optind;
if (argc < 5 || argc > 6) if (argc < 5 || argc > 6)
error ("mi_cmd_data_read_memory: Usage: ADDR WORD-FORMAT WORD-SIZE NR-ROWS NR-COLS [ASCHAR]."); error ("mi_cmd_data_read_memory: Usage: "
"ADDR WORD-FORMAT WORD-SIZE NR-ROWS NR-COLS [ASCHAR].");
/* Extract all the arguments. */ /* Extract all the arguments. */
@ -1410,7 +1421,8 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
cleanup_tuple = make_cleanup_ui_out_tuple_begin_end (uiout, NULL); cleanup_tuple = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
ui_out_field_core_addr (uiout, "addr", gdbarch, addr + row_byte); ui_out_field_core_addr (uiout, "addr", gdbarch, addr + row_byte);
/* ui_out_field_core_addr_symbolic (uiout, "saddr", addr + row_byte); */ /* ui_out_field_core_addr_symbolic (uiout, "saddr", addr +
row_byte); */
cleanup_list_data = make_cleanup_ui_out_list_begin_end (uiout, "data"); cleanup_list_data = make_cleanup_ui_out_list_begin_end (uiout, "data");
get_formatted_print_options (&opts, word_format); get_formatted_print_options (&opts, word_format);
for (col = 0, col_byte = row_byte; for (col = 0, col_byte = row_byte;
@ -1435,7 +1447,8 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
int byte; int byte;
ui_file_rewind (stream->stream); ui_file_rewind (stream->stream);
for (byte = row_byte; byte < row_byte + word_size * nr_cols; byte++) for (byte = row_byte;
byte < row_byte + word_size * nr_cols; byte++)
{ {
if (byte >= nr_bytes) if (byte >= nr_bytes)
{ {
@ -1600,7 +1613,8 @@ mi_cmd_data_write_memory (char *command, char **argv, int argc)
argc -= optind; argc -= optind;
if (argc != 4) if (argc != 4)
error ("mi_cmd_data_write_memory: Usage: [-o COLUMN_OFFSET] ADDR FORMAT WORD-SIZE VALUE."); error ("mi_cmd_data_write_memory: Usage: "
"[-o COLUMN_OFFSET] ADDR FORMAT WORD-SIZE VALUE.");
/* Extract all the arguments. */ /* Extract all the arguments. */
/* Start address of the memory dump. */ /* Start address of the memory dump. */

View File

@ -40,7 +40,8 @@
/* /*
* FUNCTIONAL DESCRIPTION: * FUNCTIONAL DESCRIPTION:
* *
* cma__int_attr_get_priority - Performs the work of cma_attr_get_priority * cma__int_attr_get_priority - Performs the work of
* cma_attr_get_priority
* *
* FORMAL PARAMETERS: * FORMAL PARAMETERS:
* *
@ -139,7 +140,8 @@
(_int_att_) = cma__validate_default_attr (_att_); \ (_int_att_) = cma__validate_default_attr (_att_); \
cma__int_lock ((_int_att_)->mutex); \ cma__int_lock ((_int_att_)->mutex); \
(*(_setting_)) \ (*(_setting_)) \
= ((_int_att_)->inherit_sched ? cma_c_sched_inherit : cma_c_sched_use_default); \ = ((_int_att_)->inherit_sched \
? cma_c_sched_inherit : cma_c_sched_use_default); \
cma__int_unlock ((_int_att_)->mutex); \ cma__int_unlock ((_int_att_)->mutex); \
} }
@ -304,7 +306,8 @@ typedef struct CMA__T_CACHE {
typedef struct CMA__T_INT_ATTR { typedef struct CMA__T_INT_ATTR {
cma__t_object header; /* Common header */ cma__t_object header; /* Common header */
struct CMA__T_INT_ATTR *attributes; /* Point to controlling attr */ struct CMA__T_INT_ATTR *attributes; /* Point to controlling attr */
struct CMA__T_INT_MUTEX *mutex; /* Serialize access to object */ struct CMA__T_INT_MUTEX *mutex; /* Serialize access to
object */
cma_t_priority priority; /* Priority of new thread */ cma_t_priority priority; /* Priority of new thread */
cma_t_sched_policy policy; /* Sched policy of thread */ cma_t_sched_policy policy; /* Sched policy of thread */
cma_t_boolean inherit_sched; /* Is scheduling inherited? */ cma_t_boolean inherit_sched; /* Is scheduling inherited? */

View File

@ -87,7 +87,8 @@ typedef struct CMA__T_DEBUG_STATE {
cma__t_int_mutex *mutex; /* Mutex for registering clients */ cma__t_int_mutex *mutex; /* Mutex for registering clients */
cma_t_integer client_count; /* Count of debug clients */ cma_t_integer client_count; /* Count of debug clients */
cma__t_deb_registry clients[cma__c_deb_max_clients+1]; cma__t_deb_registry clients[cma__c_deb_max_clients+1];
/* Array of current debug clients */ /* Array of current debug
clients */
} cma__t_debug_state; } cma__t_debug_state;
@ -122,11 +123,14 @@ extern cma__t_known_object cma__g_known_threads;
*/ */
/* Get information while in debugger context */ /* Get information while in debugger context */
extern void cma__deb_get extern void cma__deb_get (cma__t_int_tcb *,
(cma__t_int_tcb *,cma_t_debug_get,cma_t_address,cma_t_integer,cma_t_integer); cma_t_debug_get,
cma_t_address,
cma_t_integer,cma_t_integer);
/* Set information while in debugger context */ /* Set information while in debugger context */
extern void cma__deb_set (cma__t_int_tcb *,cma_t_debug_set,cma_t_address,cma_t_integer); extern void cma__deb_set (cma__t_int_tcb *, cma_t_debug_set,
cma_t_address, cma_t_integer);
extern void cma__init_debug (void); extern void cma__init_debug (void);
@ -136,7 +140,8 @@ extern void cma__deb_anytcb_to_tcb (cma_t_tcb_header *,cma__t_int_tcb **);
extern void cma__deb_fac_to_client (cma_t_integer, cma_t_key *); extern void cma__deb_fac_to_client (cma_t_integer, cma_t_key *);
extern void cma__deb_get_client_info (cma_t_key,cma_t_address *,cma_t_boolean *); extern void cma__deb_get_client_info (cma_t_key, cma_t_address *,
cma_t_boolean *);
extern void cma__deb_get_context (cma__t_int_tcb *, cma_t_key,cma_t_address *); extern void cma__deb_get_context (cma__t_int_tcb *, cma_t_key,cma_t_address *);
@ -144,8 +149,10 @@ extern cma__t_int_tcb *cma__deb_get_self_tcb (void);
extern void cma__deb_get_time_slice (cma_t_interval *); extern void cma__deb_get_time_slice (cma_t_interval *);
extern cma__t_int_tcb *cma__deb_next_tcb extern cma__t_int_tcb *cma__deb_next_tcb (cma__t_int_tcb *,
(cma__t_int_tcb *,cma_t_integer *,cma_t_integer *,cma_t_boolean *); cma_t_integer *,
cma_t_integer *,
cma_t_boolean *);
extern cma_t_boolean cma__deb_set_alert (cma__t_int_tcb *); extern cma_t_boolean cma__deb_set_alert (cma__t_int_tcb *);
@ -155,10 +162,13 @@ extern void cma__deb_set_force_dispatch (cma_t_address );
extern void cma__deb_set_time_slice (cma_t_interval); extern void cma__deb_set_time_slice (cma_t_interval);
extern void cma__deb_show_thread extern void cma__deb_show_thread (cma__t_int_tcb *, cma_t_boolean,
(cma__t_int_tcb *,cma_t_boolean,cma_t_boolean,cma___t_debug_ctx,cma__t_eol_routine, cma_t_boolean, cma___t_debug_ctx,
cma__t_eol_routine,
cma__t_eol_routine, cma__t_print_symbol); cma__t_eol_routine, cma__t_print_symbol);
extern void extern void
cma__deb_show_stats (cma__t_int_tcb *,cma_t_boolean,cma_t_boolean,cma__t_eol_routine,cma__t_eol_routine,cma__t_print_symbol); cma__deb_show_stats (cma__t_int_tcb *, cma_t_boolean,
cma_t_boolean, cma__t_eol_routine,
cma__t_eol_routine, cma__t_print_symbol);
#endif #endif

View File

@ -175,21 +175,25 @@ typedef enum CMA_T_DEBUG_SET {
/* /*
* Routine to register with the CMA debug dispatcher. * Routine to register with the CMA debug dispatcher.
*/ */
extern void cma_debug_register (cma_t_address,cma_t_key,cma_t_integer,cma_t_boolean); extern void cma_debug_register (cma_t_address,
cma_t_key,cma_t_integer, cma_t_boolean);
/* /*
* Routine to get get thread state needed by the CMA debug client. * Routine to get get thread state needed by the CMA debug client.
*/ */
extern void cma_debug_get (cma_t_thread *,cma_t_debug_get,cma_t_address,cma_t_integer); extern void cma_debug_get (cma_t_thread *,
cma_t_debug_get, cma_t_address,cma_t_integer);
/* /*
* Get thread context given an sp and a key * Get thread context given an sp and a key
*/ */
extern void cma_debug_get_sp_context (cma_t_address,cma_t_key,cma_t_address *); extern void cma_debug_get_sp_context (cma_t_address,
cma_t_key, cma_t_address *);
/* /*
* Routine to set thread state as needed by the CMA debug client. * Routine to set thread state as needed by the CMA debug client.
*/ */
extern void cma_debug_set (cma_t_thread *,cma_t_debug_set,cma_t_address,cma_t_integer); extern void cma_debug_set (cma_t_thread *,
cma_t_debug_set, cma_t_address,cma_t_integer);
#endif #endif

View File

@ -173,10 +173,13 @@ extern cma_t_status cma__val_defattr_stat (cma_t_handle *,cma__t_int_attr **);
extern cma__t_object * cma__validate_handle (cma_t_handle *, cma_t_natural ); extern cma__t_object * cma__validate_handle (cma_t_handle *, cma_t_natural );
extern cma_t_status cma__val_hand_stat (cma_t_handle *,cma_t_natural,cma__t_object **); extern cma_t_status cma__val_hand_stat (cma_t_handle *,
cma_t_natural, cma__t_object **);
extern cma__t_object *cma__validate_handle_null (cma_t_handle *,cma_t_natural); extern cma__t_object *cma__validate_handle_null (cma_t_handle *,
cma_t_natural);
extern cma_t_status cma__val_handnull_stat (cma_t_handle *,cma_t_natural,cma__t_object **); extern cma_t_status cma__val_handnull_stat (cma_t_handle *,
cma_t_natural, cma__t_object **);
#endif #endif

View File

@ -50,7 +50,8 @@ typedef struct CMA__T_INT_MUTEX {
struct CMA__T_INT_MUTEX *int_lock; /* Internal protection for mutex */ struct CMA__T_INT_MUTEX *int_lock; /* Internal protection for mutex */
cma__t_atomic_bit event; /* Clear when unlock requires action */ cma__t_atomic_bit event; /* Clear when unlock requires action */
cma__t_atomic_bit waiters; /* Clear when threads are waiting */ cma__t_atomic_bit waiters; /* Clear when threads are waiting */
cma__t_atomic_bit bitbucket; /* Fake bit to keep friendlies locked */ cma__t_atomic_bit bitbucket; /* Fake bit to keep friendlies
locked */
cma_t_mutex_kind mutex_kind; /* Kind of mutex */ cma_t_mutex_kind mutex_kind; /* Kind of mutex */
cma__t_semaphore semaphore; /* Semaphore for low-level wait */ cma__t_semaphore semaphore; /* Semaphore for low-level wait */
} cma__t_int_mutex; } cma__t_int_mutex;
@ -144,7 +145,8 @@ typedef struct CMA__T_INT_MUTEX {
cma__assert_warn ( \ cma__assert_warn ( \
(__utcb__ == ((cma__t_int_mutex *)mutex)->owner), \ (__utcb__ == ((cma__t_int_mutex *)mutex)->owner), \
"attempt to release mutx owned by another thread"); \ "attempt to release mutx owned by another thread"); \
((cma__t_int_mutex *)mutex)->owner = (cma__t_int_tcb *)cma_c_null_ptr; \ ((cma__t_int_mutex *) mutex)->owner \
= (cma__t_int_tcb *)cma_c_null_ptr; \
} \ } \
cma__unset (((cma__t_int_mutex *)mutex)->unlock); \ cma__unset (((cma__t_int_mutex *)mutex)->unlock); \
if (!cma__test_and_set (&((cma__t_int_mutex *)mutex)->event)) { \ if (!cma__test_and_set (&((cma__t_int_mutex *)mutex)->event)) { \

View File

@ -35,7 +35,8 @@
*/ */
#define cma___c_first_free_chunk 0 #define cma___c_first_free_chunk 0
#define cma___c_min_count 2 /* Smallest number of chunks to leave */ #define cma___c_min_count 2 /* Smallest number of chunks
to leave */
#define cma___c_end (-1) /* End of free list (flag) */ #define cma___c_end (-1) /* End of free list (flag) */
#define cma__c_yellow_size 0 #define cma__c_yellow_size 0
@ -111,7 +112,8 @@ typedef struct CMA___T_INT_HOLE {
#endif #endif
typedef struct CMA__T_INT_STACK { typedef struct CMA__T_INT_STACK {
cma__t_object header; /* Common header (sequence, type info */ cma__t_object header; /* Common header (sequence,
type info */
cma__t_int_attr *attributes; /* Backpointer to attr obj */ cma__t_int_attr *attributes; /* Backpointer to attr obj */
cma___t_cluster *cluster; /* Stack's cluster */ cma___t_cluster *cluster; /* Stack's cluster */
cma_t_address stack_base; /* base address of stack */ cma_t_address stack_base; /* base address of stack */

View File

@ -100,7 +100,8 @@ typedef struct CMA__T_TCB_TIME {
typedef enum CMA__T_DEBEVT { typedef enum CMA__T_DEBEVT {
cma__c_debevt_activating = 1, /* First transition to running */ cma__c_debevt_activating = 1, /* First transition to running */
cma__c_debevt_running = 2, /* Any transition to running */ cma__c_debevt_running = 2, /* Any transition to running */
cma__c_debevt_preempting = 3, /* Preemted (replaced) another thread */ cma__c_debevt_preempting = 3, /* Preemted (replaced) another
thread */
cma__c_debevt_blocking = 4, /* Any transition to blocked */ cma__c_debevt_blocking = 4, /* Any transition to blocked */
cma__c_debevt_terminating = 5, /* Final state transition */ cma__c_debevt_terminating = 5, /* Final state transition */
cma__c_debevt_term_alert = 6, /* Terminated due to alert/cancel */ cma__c_debevt_term_alert = 6, /* Terminated due to alert/cancel */
@ -135,7 +136,8 @@ typedef enum CMA__T_SUBSTATE {
* Per-thread state for the debugger * Per-thread state for the debugger
*/ */
typedef struct CMA__T_TCB_DEBUG { typedef struct CMA__T_TCB_DEBUG {
cma_t_boolean on_hold; /* Thread was put on hold by debugger */ cma_t_boolean on_hold; /* Thread was put on hold by
debugger */
cma_t_boolean activated; /* Activation event was reported */ cma_t_boolean activated; /* Activation event was reported */
cma_t_boolean did_preempt; /* Thread preempted prior one */ cma_t_boolean did_preempt; /* Thread preempted prior one */
cma_t_address start_pc; /* Start routine address */ cma_t_address start_pc; /* Start routine address */
@ -151,7 +153,8 @@ typedef struct CMA__T_TCB_DEBUG {
} cma__t_tcb_debug; } cma__t_tcb_debug;
typedef struct CMA__T_TCB_SCHED { typedef struct CMA__T_TCB_SCHED {
cma_t_integer adj_time; /* Abs. time in ticks of last prio adj */ cma_t_integer adj_time; /* Abs. time in ticks of last
prio adj */
cma_t_integer tot_time; /* Weighted ave in ticks (scaled) */ cma_t_integer tot_time; /* Weighted ave in ticks (scaled) */
cma_t_integer time_stamp; /* Abs. time in ticks of last update */ cma_t_integer time_stamp; /* Abs. time in ticks of last update */
cma_t_integer cpu_time; /* Weighted average in ticks */ cma_t_integer cpu_time; /* Weighted average in ticks */
@ -160,7 +163,8 @@ typedef struct CMA__T_TCB_SCHED {
cma_t_priority priority; /* Thread priority */ cma_t_priority priority; /* Thread priority */
cma_t_sched_policy policy; /* Scheduling policy of thread */ cma_t_sched_policy policy; /* Scheduling policy of thread */
cma_t_boolean rtb; /* "Run 'Till Block" scheduling */ cma_t_boolean rtb; /* "Run 'Till Block" scheduling */
cma_t_boolean spp; /* "Strict Priority Preemption" sched */ cma_t_boolean spp; /* "Strict Priority
Preemption" sched */
cma_t_boolean fixed_prio; /* Fixed priority */ cma_t_boolean fixed_prio; /* Fixed priority */
cma__t_sched_class class; /* Scheduling class */ cma__t_sched_class class; /* Scheduling class */
struct CMA__T_VP *processor; /* Current processor (if running) */ struct CMA__T_VP *processor; /* Current processor (if running) */
@ -196,7 +200,8 @@ typedef enum CMA__T_THKIND {
typedef enum CMA__T_SYSCALL_STATE { typedef enum CMA__T_SYSCALL_STATE {
cma__c_syscall_ok = 1, /* syscall was not interrupted */ cma__c_syscall_ok = 1, /* syscall was not interrupted */
cma__c_syscall_intintrpt = 1, /* syscall was interrupted by VTALRM */ cma__c_syscall_intintrpt = 1, /* syscall was interrupted by VTALRM */
cma__c_syscall_extintrpt = 2 /* syscall was interrupted by external signal */ cma__c_syscall_extintrpt = 2 /* syscall was interrupted by
external signal */
} cma__t_syscall_state; } cma__t_syscall_state;
@ -210,7 +215,8 @@ typedef struct CMA__T_INT_TCB {
*/ */
cma__t_object header; /* Common object header */ cma__t_object header; /* Common object header */
cma__t_tcb_pad pad1; /* Pad required to align prolog */ cma__t_tcb_pad pad1; /* Pad required to align prolog */
cma_t_tcb_prolog prolog; /* Standard prolog for tasks, threads */ cma_t_tcb_prolog prolog; /* Standard prolog for tasks,
threads */
/* /*
* Floating part of TCB (fields here on are free to be moved and resized). * Floating part of TCB (fields here on are free to be moved and resized).
@ -224,7 +230,8 @@ typedef struct CMA__T_INT_TCB {
struct CMA__T_INT_CV struct CMA__T_INT_CV
*term_cv; /* CV for join */ *term_cv; /* CV for join */
struct CMA__T_INT_MUTEX struct CMA__T_INT_MUTEX
*tswait_mutex; /* Mutex for thread-synchronous waits */ *tswait_mutex; /* Mutex for
thread-synchronous waits */
struct CMA__T_INT_CV struct CMA__T_INT_CV
*tswait_cv; /* CV for thread-synchronous waits */ *tswait_cv; /* CV for thread-synchronous waits */
cma_t_start_routine start_code; /* Address of start routine */ cma_t_start_routine start_code; /* Address of start routine */
@ -246,10 +253,13 @@ typedef struct CMA__T_INT_TCB {
# endif # endif
struct sigaction sigaction_data[NSIG]; struct sigaction sigaction_data[NSIG];
#endif #endif
cma_t_natural syscall_state; /* set if one of the cma wrapped syscalls was interrupted. */ cma_t_natural syscall_state; /* set if one of the cma
wrapped syscalls was
interrupted. */
cma_t_boolean detached; /* Set if already detached */ cma_t_boolean detached; /* Set if already detached */
cma_t_boolean terminated; /* Set if terminated */ cma_t_boolean terminated; /* Set if terminated */
cma_t_integer joiners; /* Count of joiners, for zombie frees */ cma_t_integer joiners; /* Count of joiners, for
zombie frees */
cma__t_int_alert alert; /* Current alert state info */ cma__t_int_alert alert; /* Current alert state info */
struct CMA__T_INT_CV struct CMA__T_INT_CV
*wait_cv; /* CV thread is currently waiting on */ *wait_cv; /* CV thread is currently waiting on */

View File

@ -486,7 +486,8 @@ an executable or shared library."),
&setlist, &setlist,
&showlist); &showlist);
add_cmd ("section-scripts", class_maintenance, maintenance_print_section_scripts, add_cmd ("section-scripts", class_maintenance,
maintenance_print_section_scripts,
_("Print dump of auto-loaded section scripts matching REGEXP."), _("Print dump of auto-loaded section scripts matching REGEXP."),
&maintenanceprintlist); &maintenanceprintlist);
} }

View File

@ -58,7 +58,8 @@ struct breakpoint_object
#define BPPY_REQUIRE_VALID(Breakpoint) \ #define BPPY_REQUIRE_VALID(Breakpoint) \
do { \ do { \
if ((Breakpoint)->bp == NULL) \ if ((Breakpoint)->bp == NULL) \
return PyErr_Format (PyExc_RuntimeError, _("Breakpoint %d is invalid."), \ return PyErr_Format (PyExc_RuntimeError, \
_("Breakpoint %d is invalid."), \
(Breakpoint)->number); \ (Breakpoint)->number); \
} while (0) } while (0)

View File

@ -170,7 +170,8 @@ cmdpy_function (struct cmd_list_element *command, char *args, int from_tty)
/* An error occurred computing the string representation of the /* An error occurred computing the string representation of the
error message. This is rare, but we should inform the user. */ error message. This is rare, but we should inform the user. */
printf_filtered (_("An error occurred in a Python command\n" printf_filtered (_("An error occurred in a Python command\n"
"and then another occurred computing the error message.\n")); "and then another occurred computing the "
"error message.\n"));
gdbpy_print_stack (); gdbpy_print_stack ();
} }
@ -420,7 +421,8 @@ cmdpy_init (PyObject *self, PyObject *args, PyObject *kw)
return -1; return -1;
} }
if (! PyArg_ParseTupleAndKeywords (args, kw, "si|iO", keywords, &name, &cmdtype, if (! PyArg_ParseTupleAndKeywords (args, kw, "si|iO",
keywords, &name, &cmdtype,
&completetype, &is_prefix)) &completetype, &is_prefix))
return -1; return -1;
@ -437,7 +439,8 @@ cmdpy_init (PyObject *self, PyObject *args, PyObject *kw)
if (completetype < -1 || completetype >= (int) N_COMPLETERS) if (completetype < -1 || completetype >= (int) N_COMPLETERS)
{ {
PyErr_Format (PyExc_RuntimeError, _("Invalid completion type argument.")); PyErr_Format (PyExc_RuntimeError,
_("Invalid completion type argument."));
return -1; return -1;
} }

View File

@ -569,9 +569,9 @@ gdbpy_initialize_frames (void)
if (PyType_Ready (&frame_object_type) < 0) if (PyType_Ready (&frame_object_type) < 0)
return; return;
/* Note: These would probably be best exposed as class attributes of Frame, /* Note: These would probably be best exposed as class attributes of
but I don't know how to do it except by messing with the type's dictionary. Frame, but I don't know how to do it except by messing with the
That seems too messy. */ type's dictionary. That seems too messy. */
PyModule_AddIntConstant (gdb_module, "NORMAL_FRAME", NORMAL_FRAME); PyModule_AddIntConstant (gdb_module, "NORMAL_FRAME", NORMAL_FRAME);
PyModule_AddIntConstant (gdb_module, "DUMMY_FRAME", DUMMY_FRAME); PyModule_AddIntConstant (gdb_module, "DUMMY_FRAME", DUMMY_FRAME);
PyModule_AddIntConstant (gdb_module, "SIGTRAMP_FRAME", SIGTRAMP_FRAME); PyModule_AddIntConstant (gdb_module, "SIGTRAMP_FRAME", SIGTRAMP_FRAME);

View File

@ -175,7 +175,8 @@ gdbpy_initialize_objfile (void)
return; return;
Py_INCREF (&objfile_object_type); Py_INCREF (&objfile_object_type);
PyModule_AddObject (gdb_module, "Objfile", (PyObject *) &objfile_object_type); PyModule_AddObject (gdb_module, "Objfile",
(PyObject *) &objfile_object_type);
} }

View File

@ -513,7 +513,8 @@ parmpy_init (PyObject *self, PyObject *args, PyObject *kwds)
&& parmclass != var_optional_filename && parmclass != var_filename && parmclass != var_optional_filename && parmclass != var_filename
&& parmclass != var_zinteger && parmclass != var_enum) && parmclass != var_zinteger && parmclass != var_enum)
{ {
PyErr_SetString (PyExc_RuntimeError, _("Invalid parameter class argument.")); PyErr_SetString (PyExc_RuntimeError,
_("Invalid parameter class argument."));
return -1; return -1;
} }

View File

@ -185,7 +185,8 @@ gdbpy_initialize_pspace (void)
return; return;
Py_INCREF (&pspace_object_type); Py_INCREF (&pspace_object_type);
PyModule_AddObject (gdb_module, "Progspace", (PyObject *) &pspace_object_type); PyModule_AddObject (gdb_module, "Progspace",
(PyObject *) &pspace_object_type);
} }

View File

@ -339,7 +339,8 @@ gdbpy_initialize_symbols (void)
PyModule_AddIntConstant (gdb_module, "SYMBOL_LOC_BLOCK", LOC_BLOCK); PyModule_AddIntConstant (gdb_module, "SYMBOL_LOC_BLOCK", LOC_BLOCK);
PyModule_AddIntConstant (gdb_module, "SYMBOL_LOC_CONST_BYTES", PyModule_AddIntConstant (gdb_module, "SYMBOL_LOC_CONST_BYTES",
LOC_CONST_BYTES); LOC_CONST_BYTES);
PyModule_AddIntConstant (gdb_module, "SYMBOL_LOC_UNRESOLVED", LOC_UNRESOLVED); PyModule_AddIntConstant (gdb_module, "SYMBOL_LOC_UNRESOLVED",
LOC_UNRESOLVED);
PyModule_AddIntConstant (gdb_module, "SYMBOL_LOC_OPTIMIZED_OUT", PyModule_AddIntConstant (gdb_module, "SYMBOL_LOC_OPTIMIZED_OUT",
LOC_OPTIMIZED_OUT); LOC_OPTIMIZED_OUT);
PyModule_AddIntConstant (gdb_module, "SYMBOL_LOC_COMPUTED", LOC_COMPUTED); PyModule_AddIntConstant (gdb_module, "SYMBOL_LOC_COMPUTED", LOC_COMPUTED);
@ -367,7 +368,8 @@ static PyGetSetDef symbol_object_getset[] = {
{ "name", sympy_get_name, NULL, { "name", sympy_get_name, NULL,
"Name of the symbol, as it appears in the source code.", NULL }, "Name of the symbol, as it appears in the source code.", NULL },
{ "linkage_name", sympy_get_linkage_name, NULL, { "linkage_name", sympy_get_linkage_name, NULL,
"Name of the symbol, as used by the linker (i.e., may be mangled).", NULL }, "Name of the symbol, as used by the linker (i.e., may be mangled).",
NULL },
{ "print_name", sympy_get_print_name, NULL, { "print_name", sympy_get_print_name, NULL,
"Name of the symbol in a form suitable for output.\n\ "Name of the symbol in a form suitable for output.\n\
This is either name or linkage_name, depending on whether the user asked GDB\n\ This is either name or linkage_name, depending on whether the user asked GDB\n\

View File

@ -321,7 +321,8 @@ valpy_lazy_string (PyObject *self, PyObject *args, PyObject *kw)
value = value_ind (value); value = value_ind (value);
str_obj = gdbpy_create_lazy_string_object (value_address (value), length, str_obj = gdbpy_create_lazy_string_object (value_address (value), length,
user_encoding, value_type (value)); user_encoding,
value_type (value));
return (PyObject *) str_obj; return (PyObject *) str_obj;
} }
@ -1178,7 +1179,8 @@ convert_value_from_python (PyObject *obj)
value = value_copy (((value_object *) result)->value); value = value_copy (((value_object *) result)->value);
} }
else else
PyErr_Format (PyExc_TypeError, _("Could not convert Python object: %s."), PyErr_Format (PyExc_TypeError,
_("Could not convert Python object: %s."),
PyString_AsString (PyObject_Str (obj))); PyString_AsString (PyObject_Str (obj)));
} }
if (except.reason < 0) if (except.reason < 0)
@ -1238,7 +1240,8 @@ static PyGetSetDef value_object_getset[] = {
{ "address", valpy_get_address, NULL, "The address of the value.", { "address", valpy_get_address, NULL, "The address of the value.",
NULL }, NULL },
{ "is_optimized_out", valpy_get_is_optimized_out, NULL, { "is_optimized_out", valpy_get_is_optimized_out, NULL,
"Boolean telling whether the value is optimized out (i.e., not available).", "Boolean telling whether the value is optimized "
"out (i.e., not available).",
NULL }, NULL },
{ "type", valpy_get_type, NULL, "Type of the value.", NULL }, { "type", valpy_get_type, NULL, "Type of the value.", NULL },
{ "dynamic_type", valpy_get_dynamic_type, NULL, { "dynamic_type", valpy_get_dynamic_type, NULL,
@ -1258,7 +1261,8 @@ Cast the value to the supplied type, as if by the C++\n\
reinterpret_cast operator." reinterpret_cast operator."
}, },
{ "dereference", valpy_dereference, METH_NOARGS, "Dereferences the value." }, { "dereference", valpy_dereference, METH_NOARGS, "Dereferences the value." },
{ "lazy_string", (PyCFunction) valpy_lazy_string, METH_VARARGS | METH_KEYWORDS, { "lazy_string", (PyCFunction) valpy_lazy_string,
METH_VARARGS | METH_KEYWORDS,
"lazy_string ([encoding] [, length]) -> lazy_string\n\ "lazy_string ([encoding] [, length]) -> lazy_string\n\
Return a lazy string representation of the value." }, Return a lazy string representation of the value." },
{ "string", (PyCFunction) valpy_string, METH_VARARGS | METH_KEYWORDS, { "string", (PyCFunction) valpy_string, METH_VARARGS | METH_KEYWORDS,
@ -1320,7 +1324,8 @@ PyTypeObject value_object_type = {
0, /*tp_getattro*/ 0, /*tp_getattro*/
0, /*tp_setattro*/ 0, /*tp_setattro*/
0, /*tp_as_buffer*/ 0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES | Py_TPFLAGS_BASETYPE, /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES
| Py_TPFLAGS_BASETYPE, /*tp_flags*/
"GDB value object", /* tp_doc */ "GDB value object", /* tp_doc */
0, /* tp_traverse */ 0, /* tp_traverse */
0, /* tp_clear */ 0, /* tp_clear */

View File

@ -114,7 +114,8 @@ PyObject *gdbpy_selected_frame (PyObject *self, PyObject *args);
PyObject *gdbpy_block_for_pc (PyObject *self, PyObject *args); PyObject *gdbpy_block_for_pc (PyObject *self, PyObject *args);
PyObject *gdbpy_lookup_type (PyObject *self, PyObject *args, PyObject *kw); PyObject *gdbpy_lookup_type (PyObject *self, PyObject *args, PyObject *kw);
PyObject *gdbpy_create_lazy_string_object (CORE_ADDR address, long length, PyObject *gdbpy_create_lazy_string_object (CORE_ADDR address, long length,
const char *encoding, struct type *type); const char *encoding,
struct type *type);
PyObject *gdbpy_inferiors (PyObject *unused, PyObject *unused2); PyObject *gdbpy_inferiors (PyObject *unused, PyObject *unused2);
PyObject *gdbpy_selected_thread (PyObject *self, PyObject *args); PyObject *gdbpy_selected_thread (PyObject *self, PyObject *args);
PyObject *gdbpy_string_to_argv (PyObject *self, PyObject *args); PyObject *gdbpy_string_to_argv (PyObject *self, PyObject *args);

View File

@ -436,7 +436,8 @@ gdbpy_solib_name (PyObject *self, PyObject *args)
static PyObject * static PyObject *
gdbpy_decode_line (PyObject *self, PyObject *args) gdbpy_decode_line (PyObject *self, PyObject *args)
{ {
struct symtabs_and_lines sals = { NULL, 0 }; /* Initialize to appease gcc. */ struct symtabs_and_lines sals = { NULL, 0 }; /* Initialize to
appease gcc. */
struct symtab_and_line sal; struct symtab_and_line sal;
char *arg = NULL; char *arg = NULL;
char *copy = NULL; char *copy = NULL;
@ -960,7 +961,8 @@ Enables or disables printing of Python stack traces."),
/* The casts to (char*) are for python 2.4. */ /* The casts to (char*) are for python 2.4. */
PyModule_AddStringConstant (gdb_module, "VERSION", (char*) version); PyModule_AddStringConstant (gdb_module, "VERSION", (char*) version);
PyModule_AddStringConstant (gdb_module, "HOST_CONFIG", (char*) host_name); PyModule_AddStringConstant (gdb_module, "HOST_CONFIG", (char*) host_name);
PyModule_AddStringConstant (gdb_module, "TARGET_CONFIG", (char*) target_name); PyModule_AddStringConstant (gdb_module, "TARGET_CONFIG",
(char*) target_name);
/* gdb.parameter ("data-directory") doesn't necessarily exist when the python /* gdb.parameter ("data-directory") doesn't necessarily exist when the python
script below is run (depending on order of _initialize_* functions). script below is run (depending on order of _initialize_* functions).

View File

@ -503,7 +503,8 @@ init_content_element (struct tui_win_element *element,
case DATA_WIN: case DATA_WIN:
tui_init_generic_part (&element->which_element.data_window); tui_init_generic_part (&element->which_element.data_window);
element->which_element.data_window.type = DATA_ITEM_WIN; element->which_element.data_window.type = DATA_ITEM_WIN;
((struct tui_gen_win_info *) & element->which_element.data_window)->content = ((struct tui_gen_win_info *)
&element->which_element.data_window)->content =
(void **) tui_alloc_content (1, DATA_ITEM_WIN); (void **) tui_alloc_content (1, DATA_ITEM_WIN);
((struct tui_gen_win_info *) ((struct tui_gen_win_info *)
& element->which_element.data_window)->content_size = 1; & element->which_element.data_window)->content_size = 1;
@ -544,7 +545,8 @@ init_win_info (struct tui_win_info *win_info)
{ {
case SRC_WIN: case SRC_WIN:
case DISASSEM_WIN: case DISASSEM_WIN:
win_info->detail.source_info.execution_info = (struct tui_gen_win_info *) NULL; win_info->detail.source_info.execution_info
= (struct tui_gen_win_info *) NULL;
win_info->detail.source_info.has_locator = FALSE; win_info->detail.source_info.has_locator = FALSE;
win_info->detail.source_info.horizontal_offset = 0; win_info->detail.source_info.horizontal_offset = 0;
win_info->detail.source_info.gdbarch = NULL; win_info->detail.source_info.gdbarch = NULL;
@ -646,7 +648,8 @@ tui_add_content_elements (struct tui_gen_win_info *win_info,
if (win_info->content == NULL) if (win_info->content == NULL)
{ {
win_info->content = (void **) tui_alloc_content (num_elements, win_info->type); win_info->content = (void **) tui_alloc_content (num_elements,
win_info->type);
index_start = 0; index_start = 0;
} }
else else
@ -831,7 +834,8 @@ tui_del_data_windows (tui_win_content content,
element. */ element. */
for (i = 0; i < content_size; i++) for (i = 0; i < content_size; i++)
{ {
struct tui_gen_win_info *generic_win = &content[i]->which_element.data_window; struct tui_gen_win_info *generic_win
= &content[i]->which_element.data_window;
if (generic_win != (struct tui_gen_win_info *) NULL) if (generic_win != (struct tui_gen_win_info *) NULL)
{ {
@ -854,7 +858,8 @@ tui_free_data_content (tui_win_content content,
element. */ element. */
for (i = 0; i < content_size; i++) for (i = 0; i < content_size; i++)
{ {
struct tui_gen_win_info *generic_win = &content[i]->which_element.data_window; struct tui_gen_win_info *generic_win
= &content[i]->which_element.data_window;
if (generic_win != (struct tui_gen_win_info *) NULL) if (generic_win != (struct tui_gen_win_info *) NULL)
{ {

View File

@ -193,8 +193,8 @@ tui_set_disassem_content (struct gdbarch *gdbarch, CORE_ADDR pc)
TUI_DISASM_WIN->detail.source_info.gdbarch = gdbarch; TUI_DISASM_WIN->detail.source_info.gdbarch = gdbarch;
TUI_DISASM_WIN->detail.source_info.start_line_or_addr.loa = LOA_ADDRESS; TUI_DISASM_WIN->detail.source_info.start_line_or_addr.loa = LOA_ADDRESS;
TUI_DISASM_WIN->detail.source_info.start_line_or_addr.u.addr = pc; TUI_DISASM_WIN->detail.source_info.start_line_or_addr.u.addr = pc;
cur_pc = (CORE_ADDR) cur_pc = (CORE_ADDR) (((struct tui_win_element *)
(((struct tui_win_element *) locator->content[0])->which_element.locator.addr); locator->content[0])->which_element.locator.addr);
max_lines = TUI_DISASM_WIN->generic.height - 2; /* Account for max_lines = TUI_DISASM_WIN->generic.height - 2; /* Account for
hilite. */ hilite. */
@ -262,7 +262,8 @@ tui_set_disassem_content (struct gdbarch *gdbarch, CORE_ADDR pc)
/* See whether there is a breakpoint installed. */ /* See whether there is a breakpoint installed. */
src->has_break = (!src->is_exec_point src->has_break = (!src->is_exec_point
&& breakpoint_here_p (current_program_space->aspace, pc) && breakpoint_here_p (current_program_space->aspace,
pc)
!= no_breakpoint_here); != no_breakpoint_here);
xfree (asm_lines[i].addr_string); xfree (asm_lines[i].addr_string);
@ -336,7 +337,8 @@ tui_get_begin_asm_address (struct gdbarch **gdbarch_p, CORE_ADDR *addr_p)
CORE_ADDR addr; CORE_ADDR addr;
locator = tui_locator_win_info_ptr (); locator = tui_locator_win_info_ptr ();
element = &((struct tui_win_element *) locator->content[0])->which_element.locator; element = &((struct tui_win_element *)
locator->content[0])->which_element.locator;
if (element->addr == 0) if (element->addr == 0)
{ {
@ -400,10 +402,12 @@ tui_vertical_disassem_scroll (enum tui_scroll_direction scroll_direction,
pc = content[0]->which_element.source.line_or_addr.u.addr; pc = content[0]->which_element.source.line_or_addr.u.addr;
num_to_scroll++; num_to_scroll++;
dir = (scroll_direction == FORWARD_SCROLL) ? num_to_scroll : -num_to_scroll; dir = (scroll_direction == FORWARD_SCROLL)
? num_to_scroll : -num_to_scroll;
val.loa = LOA_ADDRESS; val.loa = LOA_ADDRESS;
val.u.addr = tui_find_disassembly_address (gdbarch, pc, dir); val.u.addr = tui_find_disassembly_address (gdbarch, pc, dir);
tui_update_source_window_as_is (TUI_DISASM_WIN, gdbarch, NULL, val, FALSE); tui_update_source_window_as_is (TUI_DISASM_WIN, gdbarch,
NULL, val, FALSE);
} }
} }

View File

@ -254,8 +254,10 @@ void
tui_install_hooks (void) tui_install_hooks (void)
{ {
deprecated_target_wait_hook = tui_target_wait_hook; deprecated_target_wait_hook = tui_target_wait_hook;
deprecated_selected_frame_level_changed_hook = tui_selected_frame_level_changed_hook; deprecated_selected_frame_level_changed_hook
deprecated_print_frame_info_listing_hook = tui_print_frame_info_listing_hook; = tui_selected_frame_level_changed_hook;
deprecated_print_frame_info_listing_hook
= tui_print_frame_info_listing_hook;
deprecated_query_hook = tui_query_hook; deprecated_query_hook = tui_query_hook;

View File

@ -186,7 +186,8 @@ tui_puts (const char *string)
} }
getyx (w, TUI_CMD_WIN->detail.command_info.cur_line, getyx (w, TUI_CMD_WIN->detail.command_info.cur_line,
TUI_CMD_WIN->detail.command_info.curch); TUI_CMD_WIN->detail.command_info.curch);
TUI_CMD_WIN->detail.command_info.start_line = TUI_CMD_WIN->detail.command_info.cur_line; TUI_CMD_WIN->detail.command_info.start_line
= TUI_CMD_WIN->detail.command_info.cur_line;
/* We could defer the following. */ /* We could defer the following. */
wrefresh (w); wrefresh (w);
@ -328,7 +329,8 @@ printable_part (char *pathname)
{ {
char *temp; char *temp;
temp = rl_filename_completion_desired ? strrchr (pathname, '/') : (char *)NULL; temp = rl_filename_completion_desired
? strrchr (pathname, '/') : (char *)NULL;
#if defined (__MSDOS__) #if defined (__MSDOS__)
if (rl_filename_completion_desired if (rl_filename_completion_desired
&& temp == 0 && isalpha (pathname[0]) && temp == 0 && isalpha (pathname[0])

View File

@ -468,8 +468,10 @@ tui_set_layout_for_display_command (const char *layout_name)
up this code. - edie epstein */ up this code. - edie epstein */
if (subset_compare (buf_ptr, TUI_FLOAT_REGS_NAME)) if (subset_compare (buf_ptr, TUI_FLOAT_REGS_NAME))
{ {
if (TUI_DATA_WIN->detail.data_display_info.regs_display_type != TUI_SFLOAT_REGS if (TUI_DATA_WIN->detail.data_display_info.regs_display_type
&& TUI_DATA_WIN->detail.data_display_info.regs_display_type != TUI_DFLOAT_REGS) != TUI_SFLOAT_REGS
&& TUI_DATA_WIN->detail.data_display_info.regs_display_type
!= TUI_DFLOAT_REGS)
dpy_type = TUI_SFLOAT_REGS; dpy_type = TUI_SFLOAT_REGS;
else else
dpy_type = dpy_type =
@ -484,8 +486,8 @@ tui_set_layout_for_display_command (const char *layout_name)
dpy_type = TUI_SPECIAL_REGS; dpy_type = TUI_SPECIAL_REGS;
else if (TUI_DATA_WIN) else if (TUI_DATA_WIN)
{ {
if (TUI_DATA_WIN->detail.data_display_info.regs_display_type != if (TUI_DATA_WIN->detail.data_display_info.regs_display_type
TUI_UNDEFINED_REGS) != TUI_UNDEFINED_REGS)
dpy_type = dpy_type =
TUI_DATA_WIN->detail.data_display_info.regs_display_type; TUI_DATA_WIN->detail.data_display_info.regs_display_type;
else else

View File

@ -282,8 +282,8 @@ tui_show_register_group (struct reggroup *group,
data_item_win = data_item_win =
&display_info->regs_content[pos]->which_element.data_window; &display_info->regs_content[pos]->which_element.data_window;
data = data = &((struct tui_win_element *)
&((struct tui_win_element *) data_item_win->content[0])->which_element.data; data_item_win->content[0])->which_element.data;
if (data) if (data)
{ {
if (!refresh_values_only) if (!refresh_values_only)
@ -331,7 +331,8 @@ tui_display_registers_from (int start_element_no)
char *p; char *p;
int len; int len;
data_item_win = &display_info->regs_content[i]->which_element.data_window; data_item_win
= &display_info->regs_content[i]->which_element.data_window;
data = &((struct tui_win_element *) data = &((struct tui_win_element *)
data_item_win->content[0])->which_element.data; data_item_win->content[0])->which_element.data;
len = 0; len = 0;
@ -417,7 +418,8 @@ static void
tui_display_reg_element_at_line (int start_element_no, tui_display_reg_element_at_line (int start_element_no,
int start_line_no) int start_line_no)
{ {
if (TUI_DATA_WIN->detail.data_display_info.regs_content != (tui_win_content) NULL if (TUI_DATA_WIN->detail.data_display_info.regs_content
!= (tui_win_content) NULL
&& TUI_DATA_WIN->detail.data_display_info.regs_content_count > 0) && TUI_DATA_WIN->detail.data_display_info.regs_content_count > 0)
{ {
int element_no = start_element_no; int element_no = start_element_no;
@ -427,7 +429,8 @@ tui_display_reg_element_at_line (int start_element_no,
int last_line_no, first_line_on_last_page; int last_line_no, first_line_on_last_page;
last_line_no = tui_last_regs_line_no (); last_line_no = tui_last_regs_line_no ();
first_line_on_last_page = last_line_no - (TUI_DATA_WIN->generic.height - 2); first_line_on_last_page
= last_line_no - (TUI_DATA_WIN->generic.height - 2);
if (first_line_on_last_page < 0) if (first_line_on_last_page < 0)
first_line_on_last_page = 0; first_line_on_last_page = 0;
@ -437,7 +440,8 @@ tui_display_reg_element_at_line (int start_element_no,
display at. */ display at. */
if (TUI_DATA_WIN->detail.data_display_info.data_content_count <= 0 if (TUI_DATA_WIN->detail.data_display_info.data_content_count <= 0
&& start_line_no > first_line_on_last_page) && start_line_no > first_line_on_last_page)
element_no = tui_first_reg_element_no_inline (first_line_on_last_page); element_no
= tui_first_reg_element_no_inline (first_line_on_last_page);
} }
tui_display_registers_from (element_no); tui_display_registers_from (element_no);
} }
@ -475,7 +479,8 @@ tui_display_registers_from_line (int line_no,
line = line_no; line = line_no;
element_no = tui_first_reg_element_no_inline (line); element_no = tui_first_reg_element_no_inline (line);
if (element_no < TUI_DATA_WIN->detail.data_display_info.regs_content_count) if (element_no
< TUI_DATA_WIN->detail.data_display_info.regs_content_count)
tui_display_reg_element_at_line (element_no, line); tui_display_reg_element_at_line (element_no, line);
else else
line = (-1); line = (-1);

View File

@ -90,8 +90,10 @@ tui_set_source_content (struct symtab *s,
else else
{ {
int offset, cur_line_no, cur_line, cur_len, threshold; int offset, cur_line_no, cur_line, cur_len, threshold;
struct tui_gen_win_info *locator = tui_locator_win_info_ptr (); struct tui_gen_win_info *locator
struct tui_source_info *src = &TUI_SRC_WIN->detail.source_info; = tui_locator_win_info_ptr ();
struct tui_source_info *src
= &TUI_SRC_WIN->detail.source_info;
if (TUI_SRC_WIN->generic.title) if (TUI_SRC_WIN->generic.title)
xfree (TUI_SRC_WIN->generic.title); xfree (TUI_SRC_WIN->generic.title);
@ -116,7 +118,8 @@ tui_set_source_content (struct symtab *s,
(threshold + 1) * sizeof (char)); (threshold + 1) * sizeof (char));
while (cur_line < nlines) while (cur_line < nlines)
{ {
struct tui_win_element *element = (struct tui_win_element *) struct tui_win_element *element
= (struct tui_win_element *)
TUI_SRC_WIN->generic.content[cur_line]; TUI_SRC_WIN->generic.content[cur_line];
/* Get the first character in the line. */ /* Get the first character in the line. */
@ -129,8 +132,8 @@ tui_set_source_content (struct symtab *s,
/* Init the line with the line number. */ /* Init the line with the line number. */
sprintf (src_line, "%-6d", cur_line_no); sprintf (src_line, "%-6d", cur_line_no);
cur_len = strlen (src_line); cur_len = strlen (src_line);
i = cur_len - i = cur_len - ((cur_len / tui_default_tab_len ())
((cur_len / tui_default_tab_len ()) * tui_default_tab_len ()); * tui_default_tab_len ());
while (i < tui_default_tab_len ()) while (i < tui_default_tab_len ())
{ {
src_line[cur_len] = ' '; src_line[cur_len] = ' ';
@ -177,9 +180,11 @@ tui_set_source_content (struct symtab *s,
overwrite our buffer. */ overwrite our buffer. */
if (c == '\t') if (c == '\t')
{ {
int j, max_tab_len = tui_default_tab_len (); int j, max_tab_len
= tui_default_tab_len ();
for (j = i - ((i / max_tab_len) * max_tab_len); for (j = i - ((i / max_tab_len)
* max_tab_len);
j < max_tab_len j < max_tab_len
&& i < threshold; && i < threshold;
i++, j++) i++, j++)
@ -214,8 +219,8 @@ tui_set_source_content (struct symtab *s,
/* Now copy the line taking the offset into /* Now copy the line taking the offset into
account. */ account. */
if (strlen (src_line) > offset) if (strlen (src_line) > offset)
strcpy (((struct tui_win_element *) TUI_SRC_WIN->generic.content[ strcpy (((struct tui_win_element *)
cur_line])->which_element.source.line, TUI_SRC_WIN->generic.content[cur_line])->which_element.source.line,
&src_line[offset]); &src_line[offset]);
else else
((struct tui_win_element *) ((struct tui_win_element *)
@ -330,8 +335,10 @@ int
tui_source_is_displayed (char *fname) tui_source_is_displayed (char *fname)
{ {
return (TUI_SRC_WIN->generic.content_in_use return (TUI_SRC_WIN->generic.content_in_use
&& (strcmp (((struct tui_win_element *) (tui_locator_win_info_ptr ())-> && (strcmp (((struct tui_win_element *)
content[0])->which_element.locator.file_name, fname) == 0)); (tui_locator_win_info_ptr ())->
content[0])->which_element.locator.file_name,
fname) == 0));
} }
@ -360,7 +367,8 @@ tui_vertical_source_scroll (enum tui_scroll_direction scroll_direction,
if (l.u.line_no > s->nlines) if (l.u.line_no > s->nlines)
/* line = s->nlines - win_info->generic.content_size + 1; */ /* line = s->nlines - win_info->generic.content_size + 1; */
/* elz: fix for dts 23398. */ /* elz: fix for dts 23398. */
l.u.line_no = content[0]->which_element.source.line_or_addr.u.line_no; l.u.line_no
= content[0]->which_element.source.line_or_addr.u.line_no;
} }
else else
{ {

View File

@ -286,7 +286,8 @@ tui_set_locator_filename (const char *filename)
return; return;
} }
element = &((struct tui_win_element *) locator->content[0])->which_element.locator; element = &((struct tui_win_element *)
locator->content[0])->which_element.locator;
element->file_name[0] = 0; element->file_name[0] = 0;
strcat_to_buf (element->file_name, MAX_LOCATOR_ELEMENT_LEN, filename); strcat_to_buf (element->file_name, MAX_LOCATOR_ELEMENT_LEN, filename);
} }
@ -309,7 +310,8 @@ tui_set_locator_info (struct gdbarch *gdbarch,
locator->content_size = 1; locator->content_size = 1;
} }
element = &((struct tui_win_element *) locator->content[0])->which_element.locator; element = &((struct tui_win_element *)
locator->content[0])->which_element.locator;
element->proc_name[0] = (char) 0; element->proc_name[0] = (char) 0;
strcat_to_buf (element->proc_name, MAX_LOCATOR_ELEMENT_LEN, procname); strcat_to_buf (element->proc_name, MAX_LOCATOR_ELEMENT_LEN, procname);
element->line_no = lineno; element->line_no = lineno;
@ -358,7 +360,8 @@ tui_show_frame_info (struct frame_info *fi)
win_info = (tui_source_windows ())->list[i]; win_info = (tui_source_windows ())->list[i];
item = &((struct tui_win_element *) locator->content[0])->which_element; item = &((struct tui_win_element *)
locator->content[0])->which_element;
if (win_info == TUI_SRC_WIN) if (win_info == TUI_SRC_WIN)
{ {
start_line = (item->locator.line_no - start_line = (item->locator.line_no -
@ -370,7 +373,8 @@ tui_show_frame_info (struct frame_info *fi)
{ {
if (find_pc_partial_function (get_frame_pc (fi), (char **) NULL, if (find_pc_partial_function (get_frame_pc (fi), (char **) NULL,
&low, (CORE_ADDR) 0) == 0) &low, (CORE_ADDR) 0) == 0)
error (_("No function contains program counter for selected frame.")); error (_("No function contains program "
"counter for selected frame."));
else else
low = tui_get_low_disassembly_address (get_frame_arch (fi), low = tui_get_low_disassembly_address (get_frame_arch (fi),
low, get_frame_pc (fi)); low, get_frame_pc (fi));
@ -383,7 +387,8 @@ tui_show_frame_info (struct frame_info *fi)
l.loa = LOA_LINE; l.loa = LOA_LINE;
l.u.line_no = start_line; l.u.line_no = start_line;
if (!(source_already_displayed if (!(source_already_displayed
&& tui_line_is_displayed (item->locator.line_no, win_info, TRUE))) && tui_line_is_displayed (item->locator.line_no,
win_info, TRUE)))
tui_update_source_window (win_info, get_frame_arch (fi), tui_update_source_window (win_info, get_frame_arch (fi),
sal.symtab, l, TRUE); sal.symtab, l, TRUE);
else else
@ -400,7 +405,8 @@ tui_show_frame_info (struct frame_info *fi)
a.loa = LOA_ADDRESS; a.loa = LOA_ADDRESS;
a.u.addr = low; a.u.addr = low;
if (!tui_addr_is_displayed (item->locator.addr, win_info, TRUE)) if (!tui_addr_is_displayed (item->locator.addr,
win_info, TRUE))
tui_update_source_window (win_info, get_frame_arch (fi), tui_update_source_window (win_info, get_frame_arch (fi),
sal.symtab, a, TRUE); sal.symtab, a, TRUE);
else else
@ -435,8 +441,9 @@ extern initialize_file_ftype _initialize_tui_stack;
void void
_initialize_tui_stack (void) _initialize_tui_stack (void)
{ {
add_com ("update", class_tui, tui_update_command, _("\ add_com ("update", class_tui, tui_update_command,
Update the source window and locator to display the current execution point.\n")); _("Update the source window and locator to "
"display the current execution point.\n"));
} }
/* Command to update the display with the current execution point. */ /* Command to update the display with the current execution point. */

View File

@ -562,7 +562,8 @@ tui_scroll_left (struct tui_win_info *win_to_scroll,
window do nothing since the term should handle it. */ window do nothing since the term should handle it. */
if (win_to_scroll == TUI_SRC_WIN if (win_to_scroll == TUI_SRC_WIN
|| win_to_scroll == TUI_DISASM_WIN) || win_to_scroll == TUI_DISASM_WIN)
tui_horizontal_source_scroll (win_to_scroll, LEFT_SCROLL, _num_to_scroll); tui_horizontal_source_scroll (win_to_scroll, LEFT_SCROLL,
_num_to_scroll);
} }
} }
@ -584,7 +585,8 @@ tui_scroll_right (struct tui_win_info *win_to_scroll,
window do nothing since the term should handle it. */ window do nothing since the term should handle it. */
if (win_to_scroll == TUI_SRC_WIN if (win_to_scroll == TUI_SRC_WIN
|| win_to_scroll == TUI_DISASM_WIN) || win_to_scroll == TUI_DISASM_WIN)
tui_horizontal_source_scroll (win_to_scroll, RIGHT_SCROLL, _num_to_scroll); tui_horizontal_source_scroll (win_to_scroll, RIGHT_SCROLL,
_num_to_scroll);
} }
} }
@ -735,7 +737,8 @@ tui_resize_all (void)
{ {
first_win = TUI_DATA_WIN; first_win = TUI_DATA_WIN;
first_win->generic.width += width_diff; first_win->generic.width += width_diff;
second_win = (struct tui_win_info *) (tui_source_windows ())->list[0]; second_win = (struct tui_win_info *)
(tui_source_windows ())->list[0];
second_win->generic.width += width_diff; second_win->generic.width += width_diff;
} }
/* Change the first window's height/width. */ /* Change the first window's height/width. */
@ -777,8 +780,9 @@ tui_resize_all (void)
/* Change the command window's height/width. */ /* Change the command window's height/width. */
TUI_CMD_WIN->generic.origin.y = locator->origin.y + 1; TUI_CMD_WIN->generic.origin.y = locator->origin.y + 1;
make_invisible_and_set_new_height ( make_invisible_and_set_new_height (TUI_CMD_WIN,
TUI_CMD_WIN, TUI_CMD_WIN->generic.height + cmd_split_diff); TUI_CMD_WIN->generic.height
+ cmd_split_diff);
make_visible_with_new_height (first_win); make_visible_with_new_height (first_win);
make_visible_with_new_height (second_win); make_visible_with_new_height (second_win);
make_visible_with_new_height (TUI_CMD_WIN); make_visible_with_new_height (TUI_CMD_WIN);
@ -935,7 +939,8 @@ The window name specified must be valid and visible.\n"));
tui_refresh_data_win (); tui_refresh_data_win ();
xfree (buf_ptr); xfree (buf_ptr);
printf_filtered (_("Focus set to %s window.\n"), printf_filtered (_("Focus set to %s window.\n"),
tui_win_name ((struct tui_gen_win_info *) tui_win_with_focus ())); tui_win_name ((struct tui_gen_win_info *)
tui_win_with_focus ()));
} }
else else
warning (_("Incorrect Number of Arguments.\n%s"), FOCUS_USAGE); warning (_("Incorrect Number of Arguments.\n%s"), FOCUS_USAGE);
@ -1228,8 +1233,9 @@ tui_adjust_win_heights (struct tui_win_info *primary_win_info,
first_win, first_win,
first_win->generic.height + first_split_diff); first_win->generic.height + first_split_diff);
second_win->generic.origin.y = first_win->generic.height - 1; second_win->generic.origin.y = first_win->generic.height - 1;
make_invisible_and_set_new_height ( make_invisible_and_set_new_height (second_win,
second_win, second_win->generic.height + second_split_diff); second_win->generic.height
+ second_split_diff);
TUI_CMD_WIN->generic.origin.y = locator->origin.y + 1; TUI_CMD_WIN->generic.origin.y = locator->origin.y + 1;
make_invisible_and_set_new_height (TUI_CMD_WIN, new_height); make_invisible_and_set_new_height (TUI_CMD_WIN, new_height);
} }
@ -1267,8 +1273,8 @@ tui_adjust_win_heights (struct tui_win_info *primary_win_info,
if ((TUI_CMD_WIN->generic.height + diff) < 1) if ((TUI_CMD_WIN->generic.height + diff) < 1)
make_invisible_and_set_new_height (TUI_CMD_WIN, 1); make_invisible_and_set_new_height (TUI_CMD_WIN, 1);
else else
make_invisible_and_set_new_height ( make_invisible_and_set_new_height (TUI_CMD_WIN,
TUI_CMD_WIN, TUI_CMD_WIN->generic.height + diff); TUI_CMD_WIN->generic.height + diff);
} }
make_visible_with_new_height (TUI_CMD_WIN); make_visible_with_new_height (TUI_CMD_WIN);
make_visible_with_new_height (second_win); make_visible_with_new_height (second_win);
@ -1331,7 +1337,8 @@ make_invisible_and_set_new_height (struct tui_win_info *win_info,
/* Delete all data item windows. */ /* Delete all data item windows. */
for (i = 0; i < win_info->generic.content_size; i++) for (i = 0; i < win_info->generic.content_size; i++)
{ {
gen_win_info = (struct tui_gen_win_info *) & ((struct tui_win_element *) gen_win_info = (struct tui_gen_win_info *)
&((struct tui_win_element *)
win_info->generic.content[i])->which_element.data_window; win_info->generic.content[i])->which_element.data_window;
tui_delete_win (gen_win_info->handle); tui_delete_win (gen_win_info->handle);
gen_win_info->handle = (WINDOW *) NULL; gen_win_info->handle = (WINDOW *) NULL;
@ -1374,7 +1381,8 @@ make_visible_with_new_height (struct tui_win_info *win_info)
else if (deprecated_safe_get_selected_frame () != NULL) else if (deprecated_safe_get_selected_frame () != NULL)
{ {
struct tui_line_or_address line; struct tui_line_or_address line;
struct symtab_and_line cursal = get_current_source_symtab_and_line (); struct symtab_and_line cursal
= get_current_source_symtab_and_line ();
struct frame_info *frame = deprecated_safe_get_selected_frame (); struct frame_info *frame = deprecated_safe_get_selected_frame ();
struct gdbarch *gdbarch = get_frame_arch (frame); struct gdbarch *gdbarch = get_frame_arch (frame);

View File

@ -273,7 +273,8 @@ tui_vertical_data_scroll (enum tui_scroll_direction scroll_direction,
int first_line = (-1); int first_line = (-1);
first_element_no = tui_first_data_item_displayed (); first_element_no = tui_first_data_item_displayed ();
if (first_element_no < TUI_DATA_WIN->detail.data_display_info.regs_content_count) if (first_element_no
< TUI_DATA_WIN->detail.data_display_info.regs_content_count)
first_line = tui_line_from_reg_element_no (first_element_no); first_line = tui_line_from_reg_element_no (first_element_no);
else else
{ /* Calculate the first line from the element number which is in { /* Calculate the first line from the element number which is in

View File

@ -328,7 +328,8 @@ tui_horizontal_source_scroll (struct tui_win_info *win_info,
if (win_info->generic.type == SRC_WIN) if (win_info->generic.type == SRC_WIN)
{ {
struct symtab_and_line cursal = get_current_source_symtab_and_line (); struct symtab_and_line cursal
= get_current_source_symtab_and_line ();
if (cursal.symtab == NULL) if (cursal.symtab == NULL)
s = find_pc_symtab (get_frame_pc (get_selected_frame (NULL))); s = find_pc_symtab (get_frame_pc (get_selected_frame (NULL)));
@ -337,11 +338,12 @@ tui_horizontal_source_scroll (struct tui_win_info *win_info,
} }
if (direction == LEFT_SCROLL) if (direction == LEFT_SCROLL)
offset = win_info->detail.source_info.horizontal_offset + num_to_scroll; offset = win_info->detail.source_info.horizontal_offset
+ num_to_scroll;
else else
{ {
if ((offset = if ((offset = win_info->detail.source_info.horizontal_offset
win_info->detail.source_info.horizontal_offset - num_to_scroll) < 0) - num_to_scroll) < 0)
offset = 0; offset = 0;
} }
win_info->detail.source_info.horizontal_offset = offset; win_info->detail.source_info.horizontal_offset = offset;
@ -436,7 +438,8 @@ tui_update_breakpoint_info (struct tui_win_info *win,
int mode; int mode;
struct tui_source_element *line; struct tui_source_element *line;
line = &((struct tui_win_element *) win->generic.content[i])->which_element.source; line = &((struct tui_win_element *)
win->generic.content[i])->which_element.source;
if (current_only && !line->is_exec_point) if (current_only && !line->is_exec_point)
continue; continue;
@ -490,9 +493,11 @@ tui_set_exec_info_content (struct tui_win_info *win_info)
{ {
enum tui_status ret = TUI_SUCCESS; enum tui_status ret = TUI_SUCCESS;
if (win_info->detail.source_info.execution_info != (struct tui_gen_win_info *) NULL) if (win_info->detail.source_info.execution_info
!= (struct tui_gen_win_info *) NULL)
{ {
struct tui_gen_win_info *exec_info_ptr = win_info->detail.source_info.execution_info; struct tui_gen_win_info *exec_info_ptr
= win_info->detail.source_info.execution_info;
if (exec_info_ptr->content == NULL) if (exec_info_ptr->content == NULL)
exec_info_ptr->content = exec_info_ptr->content =
@ -510,7 +515,8 @@ tui_set_exec_info_content (struct tui_win_info *win_info)
int mode; int mode;
element = (struct tui_win_element *) exec_info_ptr->content[i]; element = (struct tui_win_element *) exec_info_ptr->content[i];
src_element = (struct tui_win_element *) win_info->generic.content[i]; src_element = (struct tui_win_element *)
win_info->generic.content[i];
memset(element->which_element.simple_string, ' ', memset(element->which_element.simple_string, ' ',
sizeof(element->which_element.simple_string)); sizeof(element->which_element.simple_string));
@ -547,7 +553,8 @@ tui_set_exec_info_content (struct tui_win_info *win_info)
void void
tui_show_exec_info_content (struct tui_win_info *win_info) tui_show_exec_info_content (struct tui_win_info *win_info)
{ {
struct tui_gen_win_info *exec_info = win_info->detail.source_info.execution_info; struct tui_gen_win_info *exec_info
= win_info->detail.source_info.execution_info;
int cur_line; int cur_line;
werase (exec_info->handle); werase (exec_info->handle);
@ -566,7 +573,8 @@ tui_show_exec_info_content (struct tui_win_info *win_info)
void void
tui_erase_exec_info_content (struct tui_win_info *win_info) tui_erase_exec_info_content (struct tui_win_info *win_info)
{ {
struct tui_gen_win_info *exec_info = win_info->detail.source_info.execution_info; struct tui_gen_win_info *exec_info
= win_info->detail.source_info.execution_info;
werase (exec_info->handle); werase (exec_info->handle);
tui_refresh_win (exec_info); tui_refresh_win (exec_info);
@ -608,7 +616,8 @@ tui_alloc_source_buffer (struct tui_win_info *win_info)
xmalloc ((max_lines * line_width) * sizeof (char)); xmalloc ((max_lines * line_width) * sizeof (char));
if (src_line_buf == (char *) NULL) if (src_line_buf == (char *) NULL)
{ {
fputs_unfiltered ("Unable to Allocate Memory for Source or Disassembly Display.\n", fputs_unfiltered ("Unable to Allocate Memory for "
"Source or Disassembly Display.\n",
gdb_stderr); gdb_stderr);
return TUI_FAILURE; return TUI_FAILURE;
} }
@ -617,7 +626,8 @@ tui_alloc_source_buffer (struct tui_win_info *win_info)
(void **) tui_alloc_content (max_lines, SRC_WIN)) == NULL) (void **) tui_alloc_content (max_lines, SRC_WIN)) == NULL)
{ {
xfree (src_line_buf); xfree (src_line_buf);
fputs_unfiltered ("Unable to Allocate Memory for Source or Disassembly Display.\n", fputs_unfiltered ("Unable to Allocate Memory for "
"Source or Disassembly Display.\n",
gdb_stderr); gdb_stderr);
return TUI_FAILURE; return TUI_FAILURE;
} }