* 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.
* xml-syscall.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>
* configure.ac, gdb.1: Copyright year update.
static void
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);
}
show_script_ext_mode (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-Script filename extension recognition is \"%s\".\n"),
+ fprintf_filtered (file,
+ _("Script filename extension recognition is \"%s\".\n"),
value);
}
if (strcmp (arg, "-") == 0)
{
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);
return;
}
static void
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);
}
const char *value)
{
if (info_verbose)
- fprintf_filtered (file, _("\
-Verbose printing of informational messages is %s.\n"), value);
+ fprintf_filtered (file,
+ _("Verbose printing of informational messages is %s.\n"),
+ value);
else
fprintf_filtered (file, _("Verbosity is %s.\n"), value);
}
show_remote_timeout (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-Timeout limit to wait for target to respond is %s.\n"),
+ fprintf_filtered (file,
+ _("Timeout limit to wait for target to respond is %s.\n"),
value);
}
show_max_user_call_depth (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-The max call depth for user-defined commands is %s.\n"),
+ fprintf_filtered (file,
+ _("The max call depth for user-defined commands is %s.\n"),
value);
}
well documented as user commands."),
&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, _("\
User-defined commands.\n\
The commands in this class are those defined by the user.\n\
FUNCTION, to list around beginning of that function,\n\
FILE:FUNCTION, to distinguish among like-named static functions.\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)
add_com_alias ("l", "list", class_files, 1);
containing that list. */
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 *prefixname, int allow_unknown,
struct cmd_list_element **list)
for (c = local_list; c; c = c->next)
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))
strcat (ambbuf, ", ");
else
{
matchlist = (char **) xrealloc ((char *) matchlist, ((matches + 1)
- * sizeof (char *)));
+ * sizeof (char *)));
matchlist[matches] = (char *) 0;
}
{
struct cmd_list_element *c;
- add_prefix_cmd ("dump", class_vars, dump_command, _("\
-Dump target code/data to a local file."),
+ add_prefix_cmd ("dump", class_vars, dump_command,
+ _("Dump target code/data to a local file."),
&dump_cmdlist, "dump ",
0/*allow-unknown*/,
&cmdlist);
- add_prefix_cmd ("append", class_vars, append_command, _("\
-Append target code/data to a local file."),
+ add_prefix_cmd ("append", class_vars, append_command,
+ _("Append target code/data to a local file."),
&append_cmdlist, "append ",
0/*allow-unknown*/,
&cmdlist);
Arguments are FILE EXPRESSION. Writes the value of EXPRESSION to\n\
the specified FILE in raw target ordered bytes.");
- add_prefix_cmd ("srec", all_commands, srec_dump_command, _("\
-Write target code/data to an srec file."),
+ add_prefix_cmd ("srec", all_commands, srec_dump_command,
+ _("Write target code/data to an srec file."),
&srec_cmdlist, "dump srec ",
0 /*allow-unknown*/,
&dump_cmdlist);
- add_prefix_cmd ("ihex", all_commands, ihex_dump_command, _("\
-Write target code/data to an intel hex file."),
+ add_prefix_cmd ("ihex", all_commands, ihex_dump_command,
+ _("Write target code/data to an intel hex file."),
&ihex_cmdlist, "dump ihex ",
0 /*allow-unknown*/,
&dump_cmdlist);
- add_prefix_cmd ("tekhex", all_commands, tekhex_dump_command, _("\
-Write target code/data to a tekhex file."),
+ add_prefix_cmd ("tekhex", all_commands, tekhex_dump_command,
+ _("Write target code/data to a tekhex file."),
&tekhex_cmdlist, "dump tekhex ",
0 /*allow-unknown*/,
&dump_cmdlist);
- add_prefix_cmd ("binary", all_commands, binary_dump_command, _("\
-Write target code/data to a raw binary file."),
+ add_prefix_cmd ("binary", all_commands, binary_dump_command,
+ _("Write target code/data to a raw binary file."),
&binary_dump_cmdlist, "dump binary ",
0 /*allow-unknown*/,
&dump_cmdlist);
- add_prefix_cmd ("binary", all_commands, binary_append_command, _("\
-Append target code/data to a raw binary file."),
+ add_prefix_cmd ("binary", all_commands, binary_append_command,
+ _("Append target code/data to a raw binary file."),
&binary_append_cmdlist, "append binary ",
0 /*allow-unknown*/,
&append_cmdlist);
show_logging_overwrite (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-Whether logging overwrites or appends to the log file is %s.\n"),
+ fprintf_filtered (file,
+ _("Whether logging overwrites or "
+ "appends to the log file is %s.\n"),
value);
}
static void
set_logging_command (char *args, int from_tty)
{
- printf_unfiltered (_("\
-\"set logging\" lets you log output to a file.\n\
-Usage: set logging on [FILENAME]\n\
- set logging off\n\
- set logging file FILENAME\n\
- set logging overwrite [on|off]\n\
- set logging redirect [on|off]\n"));
+ printf_unfiltered (_("\"set logging\" lets you log output to a file.\n"
+ "Usage: set logging on [FILENAME]\n"
+ " set logging off\n"
+ " set logging file FILENAME\n"
+ " set logging overwrite [on|off]\n"
+ " set logging redirect [on|off]\n"));
}
static void
if (deprecated_readline_begin_hook)
{
/* 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
{
hookc = 0;
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);
if (!query (_("Proceed? ")))
error (_("Not confirmed."));
break;
case CMD_POST_HOOK:
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;
default:
/* Should never come here as hookc would be 0. */
break;
default:
internal_error (__FILE__, __LINE__,
- _("do_setshow_command: invalid var_auto_boolean"));
+ _("do_setshow_command: "
+ "invalid var_auto_boolean"));
break;
}
break;
# 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 {
const char *name;
return (enum target_signal)
(hostsig - 64 + (int) TARGET_SIGNAL_REALTIME_64);
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
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)
break;
switch ((enum opt) opt)
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)))
- error
- ("mi_cmd_disassemble: Usage: ( [-f filename -l linenum [-n howmany]] | [-s startaddr -e endaddr]) [--] mixed_mode.");
+ error ("mi_cmd_disassemble: Usage: ( [-f filename -l linenum [-n "
+ "howmany]] | [-s startaddr -e endaddr]) [--] mixed_mode.");
if (argc != 1)
- error
- ("mi_cmd_disassemble: Usage: [-f filename -l linenum [-n howmany]] [-s startaddr -e endaddr] [--] mixed_mode.");
+ error ("mi_cmd_disassemble: Usage: [-f filename -l "
+ "linenum [-n howmany]] [-s startaddr -e endaddr] [--] mixed_mode.");
mixed_source_and_assembly = atoi (argv[0]);
if ((mixed_source_and_assembly != 0) && (mixed_source_and_assembly != 1))
if (!find_line_pc (s, line_num, &start))
error (_("mi_cmd_disassemble: Invalid line number"));
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,
enum print_values print_values;
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 (fi == NULL)
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
frames in the stack. */
enum print_values print_values,
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
if the value should be printed. The PRINT_EXPRESSION parameter
if (argc == 1)
{
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 == '-')
error (_("mi_cmd_var_delete: Illegal variable object name"));
}
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
char *display_hint;
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 */
if (argc == 1 || argc == 3)
expression = xstrdup (argv[1]);
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);
ui_out_field_string (uiout, "value", val);
{
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 */);
do_cleanups (cleanup_child);
}
{ "break-watch", { NULL, 0 }, mi_cmd_break_watch},
{ "data-disassemble", { NULL, 0 }, mi_cmd_disassemble},
{ "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-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-bytes", { NULL, 0 }, mi_cmd_data_read_memory_bytes},
{ "data-write-memory", { NULL, 0 }, mi_cmd_data_write_memory},
{ "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-pretty-printing", { NULL, 0 }, mi_cmd_enable_pretty_printing},
{ "environment-cd", { NULL, 0 }, mi_cmd_env_cd},
{ "exec-until", { "until", 1 }, NULL},
{ "file-exec-and-symbols", { "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-files", { NULL, 0 }, mi_cmd_file_list_exec_source_files },
+ { "file-list-exec-source-file", { NULL, 0 },
+ 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 },
{ "gdb-exit", { NULL, 0 }, mi_cmd_gdb_exit},
{ "gdb-set", { "set", 1 }, NULL },
#ifndef MI_COMMON_H
#define MI_COMMON_H
-/* Represents the reason why GDB is sending an asynchronous command to the
- front end. NOTE: When modifing this, don't forget to update gdb.texinfo! */
+/* Represents the reason why GDB is sending an asynchronous command to
+ the front end. NOTE: When modifing this, don't forget to update
+ gdb.texinfo! */
enum async_reply_reason
{
EXEC_ASYNC_BREAKPOINT_HIT = 0,
if (mi_console->quote)
{
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);
}
else
interp_to_use = interp_lookup (argv[0]);
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))
- 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]);
/* Insert the MI out hooks, making sure to also call the interpreter's hooks
}
/*
- * mi_insert_notify_hooks - This inserts a number of hooks that are meant to produce
- * async-notify ("=") MI messages while running commands in another interpreter
- * using mi_interpreter_exec. The canonical use for this is to allow access to
- * the gdb CLI interpreter from within the MI, while still producing MI style output
- * when actions in the CLI command change gdb's state.
+ * mi_insert_notify_hooks - This inserts a number of hooks that are
+ * meant to produce async-notify ("=") MI messages while running
+ * commands in another interpreter using mi_interpreter_exec. The
+ * canonical use for this is to allow access to the gdb CLI
+ * 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 mi_execute_cli_command (const char *cmd, int args_p,
const char *args);
static void mi_execute_async_cli_command (char *cli_command,
- char **argv, int argc);
+ char **argv, int argc);
static int register_changed_p (int regnum, struct regcache *,
struct regcache *);
static void get_register (struct frame_info *, int regnum, int format);
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;
}
iterate_over_threads (proceed_thread_callback, &pid);
else if (strcmp (optarg, "1") == 0)
recurse = 1;
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;
}
}
continue;
changed = register_changed_p (regnum, prev_regs, this_regs);
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)
ui_out_field_int (uiout, NULL, regnum);
}
{
changed = register_changed_p (regnum, prev_regs, this_regs);
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)
ui_out_field_int (uiout, NULL, regnum);
}
upon the particular processor being debugged. */
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];
/* Write given values into registers. The registers and values are
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
mi_cmd_data_write_register_values (char *command, char **argv, int argc)
{
numregs = gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch);
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];
error ("mi_cmd_data_write_register_values: No regs and values specified.");
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)
{
if (argc != 1)
{
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]);
argc -= optind;
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. */
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_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");
get_formatted_print_options (&opts, word_format);
for (col = 0, col_byte = row_byte;
int byte;
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)
{
argc -= optind;
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. */
/* Start address of the memory dump. */
/*
* 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:
*
(_int_att_) = cma__validate_default_attr (_att_); \
cma__int_lock ((_int_att_)->mutex); \
(*(_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); \
}
\f
typedef struct CMA__T_INT_ATTR {
cma__t_object header; /* Common header */
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_sched_policy policy; /* Sched policy of thread */
cma_t_boolean inherit_sched; /* Is scheduling inherited? */
cma__t_int_mutex *mutex; /* Mutex for registering clients */
cma_t_integer client_count; /* Count of debug clients */
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;
*/
/* Get information while in debugger context */
-extern void cma__deb_get
- (cma__t_int_tcb *,cma_t_debug_get,cma_t_address,cma_t_integer,cma_t_integer);
+extern void cma__deb_get (cma__t_int_tcb *,
+ cma_t_debug_get,
+ cma_t_address,
+ cma_t_integer,cma_t_integer);
/* 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__reinit_debug (cma_t_integer);
-extern void cma__deb_anytcb_to_tcb (cma_t_tcb_header *,cma__t_int_tcb **);
+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 *);
extern cma__t_int_tcb *cma__deb_get_self_tcb (void);
extern void cma__deb_get_time_slice (cma_t_interval *);
-extern cma__t_int_tcb *cma__deb_next_tcb
- (cma__t_int_tcb *,cma_t_integer *,cma_t_integer *,cma_t_boolean *);
+extern cma__t_int_tcb *cma__deb_next_tcb (cma__t_int_tcb *,
+ cma_t_integer *,
+ cma_t_integer *,
+ cma_t_boolean *);
extern cma_t_boolean cma__deb_set_alert (cma__t_int_tcb *);
extern void cma__deb_set_time_slice (cma_t_interval);
-extern void cma__deb_show_thread
- (cma__t_int_tcb *,cma_t_boolean,cma_t_boolean,cma___t_debug_ctx,cma__t_eol_routine,
- cma__t_eol_routine,cma__t_print_symbol);
+extern void cma__deb_show_thread (cma__t_int_tcb *, cma_t_boolean,
+ cma_t_boolean, cma___t_debug_ctx,
+ cma__t_eol_routine,
+ cma__t_eol_routine, cma__t_print_symbol);
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
/*
* 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.
*/
-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
*/
-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.
*/
-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
extern void cma__clear_handle (cma_t_handle *);
-extern void cma__object_to_handle (cma__t_object *,cma_t_handle *);
+extern void cma__object_to_handle (cma__t_object *, cma_t_handle *);
extern cma__t_int_attr * cma__validate_default_attr (cma_t_handle *);
-extern cma_t_status cma__val_defattr_stat (cma_t_handle *,cma__t_int_attr **);
+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
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 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_semaphore semaphore; /* Semaphore for low-level wait */
} cma__t_int_mutex;
cma__assert_warn ( \
(__utcb__ == ((cma__t_int_mutex *)mutex)->owner), \
"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); \
if (!cma__test_and_set (&((cma__t_int_mutex *)mutex)->event)) { \
*/
#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_yellow_size 0
#endif
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_cluster *cluster; /* Stack's cluster */
cma_t_address stack_base; /* base address of stack */
typedef enum CMA__T_DEBEVT {
cma__c_debevt_activating = 1, /* First 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_terminating = 5, /* Final state transition */
cma__c_debevt_term_alert = 6, /* Terminated due to alert/cancel */
* Per-thread state for the debugger
*/
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 did_preempt; /* Thread preempted prior one */
cma_t_address start_pc; /* Start routine address */
} cma__t_tcb_debug;
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 time_stamp; /* Abs. time in ticks of last update */
cma_t_integer cpu_time; /* Weighted average in ticks */
cma_t_priority priority; /* Thread priority */
cma_t_sched_policy policy; /* Scheduling policy of thread */
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_sched_class class; /* Scheduling class */
struct CMA__T_VP *processor; /* Current processor (if running) */
#define cma__c_thkind__dim (cma__c_thkind__last + 1)
typedef enum CMA__T_SYSCALL_STATE {
- cma__c_syscall_ok = 1, /* syscall was not interrupted */
- cma__c_syscall_intintrpt = 1, /* syscall was interrupted by VTALRM */
- cma__c_syscall_extintrpt = 2 /* syscall was interrupted by external signal */
+ cma__c_syscall_ok = 1, /* syscall was not interrupted */
+ cma__c_syscall_intintrpt = 1, /* syscall was interrupted by VTALRM */
+ cma__c_syscall_extintrpt = 2 /* syscall was interrupted by
+ external signal */
} cma__t_syscall_state;
*/
cma__t_object header; /* Common object header */
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).
struct CMA__T_INT_CV
*term_cv; /* CV for join */
struct CMA__T_INT_MUTEX
- *tswait_mutex; /* Mutex for thread-synchronous waits */
+ *tswait_mutex; /* Mutex for
+ thread-synchronous waits */
struct CMA__T_INT_CV
*tswait_cv; /* CV for thread-synchronous waits */
cma_t_start_routine start_code; /* Address of start routine */
# endif
struct sigaction sigaction_data[NSIG];
#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 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 */
struct CMA__T_INT_CV
*wait_cv; /* CV thread is currently waiting on */
&setlist,
&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."),
&maintenanceprintlist);
}
#define BPPY_REQUIRE_VALID(Breakpoint) \
do { \
if ((Breakpoint)->bp == NULL) \
- return PyErr_Format (PyExc_RuntimeError, _("Breakpoint %d is invalid."), \
+ return PyErr_Format (PyExc_RuntimeError, \
+ _("Breakpoint %d is invalid."), \
(Breakpoint)->number); \
} while (0)
exception if it is invalid. This macro is for use in setter functions. */
#define BPPY_SET_REQUIRE_VALID(Breakpoint) \
do { \
- if ((Breakpoint)->bp == NULL) \
+ if ((Breakpoint)->bp == NULL) \
{ \
PyErr_Format (PyExc_RuntimeError, _("Breakpoint %d is invalid."), \
(Breakpoint)->number); \
/* An error occurred computing the string representation of the
error message. This is rare, but we should inform the user. */
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 ();
}
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))
return -1;
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;
}
if (PyType_Ready (&frame_object_type) < 0)
return;
- /* Note: These would probably be best exposed as class attributes of Frame,
- but I don't know how to do it except by messing with the type's dictionary.
- That seems too messy. */
+ /* Note: These would probably be best exposed as class attributes of
+ Frame, but I don't know how to do it except by messing with the
+ type's dictionary. That seems too messy. */
PyModule_AddIntConstant (gdb_module, "NORMAL_FRAME", NORMAL_FRAME);
PyModule_AddIntConstant (gdb_module, "DUMMY_FRAME", DUMMY_FRAME);
PyModule_AddIntConstant (gdb_module, "SIGTRAMP_FRAME", SIGTRAMP_FRAME);
return;
Py_INCREF (&objfile_object_type);
- PyModule_AddObject (gdb_module, "Objfile", (PyObject *) &objfile_object_type);
+ PyModule_AddObject (gdb_module, "Objfile",
+ (PyObject *) &objfile_object_type);
}
\f
&& parmclass != var_optional_filename && parmclass != var_filename
&& 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;
Py_INCREF (&pspace_object_type);
- PyModule_AddObject (gdb_module, "Progspace", (PyObject *) &pspace_object_type);
+ PyModule_AddObject (gdb_module, "Progspace",
+ (PyObject *) &pspace_object_type);
}
\f
PyModule_AddIntConstant (gdb_module, "SYMBOL_LOC_BLOCK", LOC_BLOCK);
PyModule_AddIntConstant (gdb_module, "SYMBOL_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",
LOC_OPTIMIZED_OUT);
PyModule_AddIntConstant (gdb_module, "SYMBOL_LOC_COMPUTED", LOC_COMPUTED);
{ "name", sympy_get_name, NULL,
"Name of the symbol, as it appears in the source code.", 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,
"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\
value = value_ind (value);
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;
}
value = value_copy (((value_object *) result)->value);
}
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)));
}
if (except.reason < 0)
{ "address", valpy_get_address, NULL, "The address of the value.",
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 },
{ "type", valpy_get_type, NULL, "Type of the value.", NULL },
{ "dynamic_type", valpy_get_dynamic_type, NULL,
reinterpret_cast operator."
},
{ "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\
Return a lazy string representation of the value." },
{ "string", (PyCFunction) valpy_string, METH_VARARGS | METH_KEYWORDS,
0, /*tp_getattro*/
0, /*tp_setattro*/
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 */
0, /* tp_traverse */
0, /* tp_clear */
PyObject *gdbpy_block_for_pc (PyObject *self, PyObject *args);
PyObject *gdbpy_lookup_type (PyObject *self, PyObject *args, PyObject *kw);
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_selected_thread (PyObject *self, PyObject *args);
PyObject *gdbpy_string_to_argv (PyObject *self, PyObject *args);
static PyObject *
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;
char *arg = NULL;
char *copy = NULL;
/* The casts to (char*) are for python 2.4. */
PyModule_AddStringConstant (gdb_module, "VERSION", (char*) version);
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
script below is run (depending on order of _initialize_* functions).
case DATA_WIN:
tui_init_generic_part (&element->which_element.data_window);
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);
((struct tui_gen_win_info *)
& element->which_element.data_window)->content_size = 1;
{
case SRC_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.horizontal_offset = 0;
win_info->detail.source_info.gdbarch = 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;
}
else
element. */
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)
{
element. */
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)
{
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.u.addr = pc;
- cur_pc = (CORE_ADDR)
- (((struct tui_win_element *) locator->content[0])->which_element.locator.addr);
+ cur_pc = (CORE_ADDR) (((struct tui_win_element *)
+ locator->content[0])->which_element.locator.addr);
max_lines = TUI_DISASM_WIN->generic.height - 2; /* Account for
hilite. */
/* See whether there is a breakpoint installed. */
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);
xfree (asm_lines[i].addr_string);
CORE_ADDR addr;
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)
{
pc = content[0]->which_element.source.line_or_addr.u.addr;
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.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);
}
}
tui_install_hooks (void)
{
deprecated_target_wait_hook = tui_target_wait_hook;
- deprecated_selected_frame_level_changed_hook = tui_selected_frame_level_changed_hook;
- deprecated_print_frame_info_listing_hook = tui_print_frame_info_listing_hook;
+ deprecated_selected_frame_level_changed_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;
}
getyx (w, TUI_CMD_WIN->detail.command_info.cur_line,
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. */
wrefresh (w);
{
char *temp;
- temp = rl_filename_completion_desired ? strrchr (pathname, '/') : (char *)NULL;
+ temp = rl_filename_completion_desired
+ ? strrchr (pathname, '/') : (char *)NULL;
#if defined (__MSDOS__)
if (rl_filename_completion_desired
&& temp == 0 && isalpha (pathname[0])
up this code. - edie epstein */
if (subset_compare (buf_ptr, TUI_FLOAT_REGS_NAME))
{
- if (TUI_DATA_WIN->detail.data_display_info.regs_display_type != TUI_SFLOAT_REGS
- && TUI_DATA_WIN->detail.data_display_info.regs_display_type != TUI_DFLOAT_REGS)
+ if (TUI_DATA_WIN->detail.data_display_info.regs_display_type
+ != TUI_SFLOAT_REGS
+ && TUI_DATA_WIN->detail.data_display_info.regs_display_type
+ != TUI_DFLOAT_REGS)
dpy_type = TUI_SFLOAT_REGS;
else
dpy_type =
dpy_type = TUI_SPECIAL_REGS;
else if (TUI_DATA_WIN)
{
- if (TUI_DATA_WIN->detail.data_display_info.regs_display_type !=
- TUI_UNDEFINED_REGS)
+ if (TUI_DATA_WIN->detail.data_display_info.regs_display_type
+ != TUI_UNDEFINED_REGS)
dpy_type =
TUI_DATA_WIN->detail.data_display_info.regs_display_type;
else
data_item_win =
&display_info->regs_content[pos]->which_element.data_window;
- data =
- &((struct tui_win_element *) data_item_win->content[0])->which_element.data;
+ data = &((struct tui_win_element *)
+ data_item_win->content[0])->which_element.data;
if (data)
{
if (!refresh_values_only)
char *p;
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_item_win->content[0])->which_element.data;
len = 0;
data_item_win = &display_info->regs_content[i]
->which_element.data_window;
data_element_ptr = &((struct tui_win_element *)
- data_item_win->content[0])->which_element.data;
+ data_item_win->content[0])->which_element.data;
if (data_item_win->handle != (WINDOW*) NULL
&& (data_item_win->height != 1
|| data_item_win->width != item_win_width
tui_display_reg_element_at_line (int start_element_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)
{
int element_no = start_element_no;
int last_line_no, first_line_on_last_page;
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)
first_line_on_last_page = 0;
display at. */
if (TUI_DATA_WIN->detail.data_display_info.data_content_count <= 0
&& 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);
}
line = line_no;
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);
else
line = (-1);
else
{
int offset, cur_line_no, cur_line, cur_len, threshold;
- struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
- struct tui_source_info *src = &TUI_SRC_WIN->detail.source_info;
+ struct tui_gen_win_info *locator
+ = tui_locator_win_info_ptr ();
+ struct tui_source_info *src
+ = &TUI_SRC_WIN->detail.source_info;
if (TUI_SRC_WIN->generic.title)
xfree (TUI_SRC_WIN->generic.title);
(threshold + 1) * sizeof (char));
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];
/* Get the first character in the line. */
/* Init the line with the line number. */
sprintf (src_line, "%-6d", cur_line_no);
cur_len = strlen (src_line);
- i = cur_len -
- ((cur_len / tui_default_tab_len ()) * tui_default_tab_len ());
+ i = cur_len - ((cur_len / tui_default_tab_len ())
+ * tui_default_tab_len ());
while (i < tui_default_tab_len ())
{
src_line[cur_len] = ' ';
overwrite our buffer. */
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
&& i < threshold;
i++, j++)
/* Now copy the line taking the offset into
account. */
if (strlen (src_line) > offset)
- strcpy (((struct tui_win_element *) TUI_SRC_WIN->generic.content[
- cur_line])->which_element.source.line,
+ strcpy (((struct tui_win_element *)
+ TUI_SRC_WIN->generic.content[cur_line])->which_element.source.line,
&src_line[offset]);
else
((struct tui_win_element *)
tui_source_is_displayed (char *fname)
{
return (TUI_SRC_WIN->generic.content_in_use
- && (strcmp (((struct tui_win_element *) (tui_locator_win_info_ptr ())->
- content[0])->which_element.locator.file_name, fname) == 0));
+ && (strcmp (((struct tui_win_element *)
+ (tui_locator_win_info_ptr ())->
+ content[0])->which_element.locator.file_name,
+ fname) == 0));
}
if (l.u.line_no > s->nlines)
/* line = s->nlines - win_info->generic.content_size + 1; */
/* 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
{
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;
strcat_to_buf (element->file_name, MAX_LOCATOR_ELEMENT_LEN, filename);
}
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;
strcat_to_buf (element->proc_name, MAX_LOCATOR_ELEMENT_LEN, procname);
element->line_no = lineno;
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)
{
start_line = (item->locator.line_no -
{
if (find_pc_partial_function (get_frame_pc (fi), (char **) NULL,
&low, (CORE_ADDR) 0) == 0)
- error (_("No function contains program counter for selected frame."));
+ error (_("No function contains program "
+ "counter for selected frame."));
else
low = tui_get_low_disassembly_address (get_frame_arch (fi),
low, get_frame_pc (fi));
l.loa = LOA_LINE;
l.u.line_no = start_line;
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),
sal.symtab, l, TRUE);
else
a.loa = LOA_ADDRESS;
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),
sal.symtab, a, TRUE);
else
void
_initialize_tui_stack (void)
{
- add_com ("update", class_tui, tui_update_command, _("\
-Update the source window and locator to display the current execution point.\n"));
+ add_com ("update", class_tui, tui_update_command,
+ _("Update the source window and locator to "
+ "display the current execution point.\n"));
}
/* Command to update the display with the current execution point. */
window do nothing since the term should handle it. */
if (win_to_scroll == TUI_SRC_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);
}
}
window do nothing since the term should handle it. */
if (win_to_scroll == TUI_SRC_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);
}
}
{
first_win = TUI_DATA_WIN;
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;
}
/* Change the first window's height/width. */
/* Change the command window's height/width. */
TUI_CMD_WIN->generic.origin.y = locator->origin.y + 1;
- make_invisible_and_set_new_height (
- TUI_CMD_WIN, TUI_CMD_WIN->generic.height + cmd_split_diff);
+ make_invisible_and_set_new_height (TUI_CMD_WIN,
+ TUI_CMD_WIN->generic.height
+ + cmd_split_diff);
make_visible_with_new_height (first_win);
make_visible_with_new_height (second_win);
make_visible_with_new_height (TUI_CMD_WIN);
tui_refresh_data_win ();
xfree (buf_ptr);
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
warning (_("Incorrect Number of Arguments.\n%s"), FOCUS_USAGE);
first_win,
first_win->generic.height + first_split_diff);
second_win->generic.origin.y = first_win->generic.height - 1;
- make_invisible_and_set_new_height (
- second_win, second_win->generic.height + second_split_diff);
+ make_invisible_and_set_new_height (second_win,
+ second_win->generic.height
+ + second_split_diff);
TUI_CMD_WIN->generic.origin.y = locator->origin.y + 1;
make_invisible_and_set_new_height (TUI_CMD_WIN, new_height);
}
if ((TUI_CMD_WIN->generic.height + diff) < 1)
make_invisible_and_set_new_height (TUI_CMD_WIN, 1);
else
- make_invisible_and_set_new_height (
- TUI_CMD_WIN, TUI_CMD_WIN->generic.height + diff);
+ make_invisible_and_set_new_height (TUI_CMD_WIN,
+ TUI_CMD_WIN->generic.height + diff);
}
make_visible_with_new_height (TUI_CMD_WIN);
make_visible_with_new_height (second_win);
/* Delete all data item windows. */
for (i = 0; i < win_info->generic.content_size; i++)
{
- gen_win_info = (struct tui_gen_win_info *) & ((struct tui_win_element *)
- win_info->generic.content[i])->which_element.data_window;
+ gen_win_info = (struct tui_gen_win_info *)
+ &((struct tui_win_element *)
+ win_info->generic.content[i])->which_element.data_window;
tui_delete_win (gen_win_info->handle);
gen_win_info->handle = (WINDOW *) NULL;
}
else if (deprecated_safe_get_selected_frame () != NULL)
{
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 gdbarch *gdbarch = get_frame_arch (frame);
data_item_ptr = &TUI_DATA_WIN->detail.data_display_info.
data_content[i]->which_element.data_window;
data_element_ptr = &((tui_win_content)
- data_item_win_ptr->content)[0]->which_element.data;
+ data_item_win_ptr->content)[0]->which_element.data;
if value
has changed (data_element_ptr, frame, &new_value)
{
int first_line = (-1);
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);
else
{ /* Calculate the first line from the element number which is in
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)
s = find_pc_symtab (get_frame_pc (get_selected_frame (NULL)));
}
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
{
- if ((offset =
- win_info->detail.source_info.horizontal_offset - num_to_scroll) < 0)
+ if ((offset = win_info->detail.source_info.horizontal_offset
+ - num_to_scroll) < 0)
offset = 0;
}
win_info->detail.source_info.horizontal_offset = offset;
int mode;
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)
continue;
{
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)
exec_info_ptr->content =
int mode;
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, ' ',
sizeof(element->which_element.simple_string));
void
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;
werase (exec_info->handle);
void
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);
tui_refresh_win (exec_info);
xmalloc ((max_lines * line_width) * sizeof (char));
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);
return TUI_FAILURE;
}
(void **) tui_alloc_content (max_lines, SRC_WIN)) == NULL)
{
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);
return TUI_FAILURE;
}