diff options
Diffstat (limited to 'gdb/mi')
-rw-r--r-- | gdb/mi/mi-cmd-break.c | 3 | ||||
-rw-r--r-- | gdb/mi/mi-cmd-disas.c | 11 | ||||
-rw-r--r-- | gdb/mi/mi-cmd-stack.c | 6 | ||||
-rw-r--r-- | gdb/mi/mi-cmd-var.c | 18 | ||||
-rw-r--r-- | gdb/mi/mi-cmds.c | 15 | ||||
-rw-r--r-- | gdb/mi/mi-common.h | 5 | ||||
-rw-r--r-- | gdb/mi/mi-console.c | 3 | ||||
-rw-r--r-- | gdb/mi/mi-interp.c | 17 | ||||
-rw-r--r-- | gdb/mi/mi-main.c | 42 |
9 files changed, 77 insertions, 43 deletions
diff --git a/gdb/mi/mi-cmd-break.c b/gdb/mi/mi-cmd-break.c index 38d9e6f..245cf448 100644 --- a/gdb/mi/mi-cmd-break.c +++ b/gdb/mi/mi-cmd-break.c @@ -103,7 +103,8 @@ mi_cmd_break_insert (char *command, char **argv, int argc) 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) diff --git a/gdb/mi/mi-cmd-disas.c b/gdb/mi/mi-cmd-disas.c index 692342b..73d6373 100644 --- a/gdb/mi/mi-cmd-disas.c +++ b/gdb/mi/mi-cmd-disas.c @@ -128,12 +128,12 @@ mi_cmd_disassemble (char *command, char **argv, int argc) 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)) @@ -151,7 +151,8 @@ mi_cmd_disassemble (char *command, char **argv, int argc) 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, diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c index 11914fd..cdc7475 100644 --- a/gdb/mi/mi-cmd-stack.c +++ b/gdb/mi/mi-cmd-stack.c @@ -168,7 +168,8 @@ mi_cmd_stack_list_args (char *command, char **argv, int argc) 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) { @@ -195,7 +196,8 @@ mi_cmd_stack_list_args (char *command, char **argv, int argc) 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. */ diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c index 1478cb0..8e0f410 100644 --- a/gdb/mi/mi-cmd-var.c +++ b/gdb/mi/mi-cmd-var.c @@ -41,7 +41,8 @@ static void varobj_update_one (struct varobj *var, 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 @@ -180,7 +181,8 @@ mi_cmd_var_delete (char *command, char **argv, int argc) 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")); } @@ -232,7 +234,8 @@ mi_parse_format (const char *arg) 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 @@ -400,7 +403,8 @@ mi_cmd_var_list_children (char *command, char **argv, int argc) 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) @@ -617,7 +621,8 @@ mi_cmd_var_assign (char *command, char **argv, int argc) 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); @@ -793,7 +798,8 @@ varobj_update_one (struct varobj *var, enum print_values print_values, { 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); } diff --git a/gdb/mi/mi-cmds.c b/gdb/mi/mi-cmds.c index 3793064..0b32db0 100644 --- a/gdb/mi/mi-cmds.c +++ b/gdb/mi/mi-cmds.c @@ -47,14 +47,17 @@ struct mi_cmd mi_cmds[] = { "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}, @@ -75,8 +78,10 @@ struct mi_cmd mi_cmds[] = { "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 }, diff --git a/gdb/mi/mi-common.h b/gdb/mi/mi-common.h index 0815f09..e3aab7d 100644 --- a/gdb/mi/mi-common.h +++ b/gdb/mi/mi-common.h @@ -20,8 +20,9 @@ #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, diff --git a/gdb/mi/mi-console.c b/gdb/mi/mi-console.c index fbe69ca..df64b6c 100644 --- a/gdb/mi/mi-console.c +++ b/gdb/mi/mi-console.c @@ -104,7 +104,8 @@ mi_console_raw_packet (void *data, 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 diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c index 2338639..6aaed3a 100644 --- a/gdb/mi/mi-interp.c +++ b/gdb/mi/mi-interp.c @@ -196,10 +196,12 @@ mi_cmd_interpreter_exec (char *command, char **argv, int argc) 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 @@ -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 - * 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 diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index a2bfc40..27f7865 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -96,7 +96,7 @@ static void mi_cmd_execute (struct mi_parse *parse); 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); @@ -240,7 +240,9 @@ exec_continue (char **argv, int argc) 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); @@ -830,7 +832,8 @@ mi_cmd_list_thread_groups (char *command, char **argv, int argc) 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; } } @@ -981,7 +984,8 @@ mi_cmd_data_list_changed_registers (char *command, char **argv, int argc) 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); } @@ -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); 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); } @@ -1058,7 +1063,8 @@ mi_cmd_data_list_register_values (char *command, char **argv, int argc) 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]; @@ -1160,7 +1166,8 @@ get_register (struct frame_info *frame, int regnum, int format) /* 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) { @@ -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); 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]; @@ -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."); 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) { @@ -1231,7 +1240,8 @@ mi_cmd_data_evaluate_expression (char *command, char **argv, int argc) 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]); @@ -1317,7 +1327,8 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc) 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. */ @@ -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); 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; @@ -1435,7 +1447,8 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc) 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) { @@ -1600,7 +1613,8 @@ mi_cmd_data_write_memory (char *command, char **argv, int argc) 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. */ |