+2011-01-12 Tom Tromey <tromey@redhat.com>
+
+ * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Fix error
+ messages.
+ * mi/mi-main.c (mi_cmd_thread_select): Fix error messages.
+ (mi_cmd_thread_list_ids): Likewise.
+ (mi_cmd_data_list_changed_registers): Likewise.
+ (mi_cmd_data_list_register_values): Likewise.
+ (mi_cmd_data_write_register_values): Likewise.
+ (mi_cmd_data_evaluate_expression): Likewise.
+ (mi_cmd_data_read_memory): Likewise.
+ (mi_cmd_data_read_memory_bytes): Likewise.
+ (mi_cmd_data_write_memory): Likewise.
+ (mi_cmd_enable_timings): Likewise.
+ * mi/mi-interp.c (mi_cmd_interpreter_exec): Fix error messages.
+ * mi/mi-cmd-var.c (mi_cmd_var_create): Fix error messages.
+ (mi_cmd_var_delete): Likewise.
+ (mi_cmd_var_set_format): Likewise.
+ (mi_cmd_var_show_format): Likewise.
+ (mi_cmd_var_info_num_children): Likewise.
+ (mi_cmd_var_list_children): Likewise.
+ (mi_cmd_var_info_type): Likewise.
+ (mi_cmd_var_info_expression): Likewise.
+ (mi_cmd_var_show_attributes): Likewise.
+ (mi_cmd_var_assign): Likewise.
+ (mi_cmd_var_update): Likewise.
+ (mi_cmd_enable_pretty_printing): Likewise.
+ (mi_cmd_var_set_update_range): Likewise.
+ * mi/mi-cmd-target.c (mi_cmd_target_file_get): Fix error
+ messages.
+ (mi_cmd_target_file_put): Likewise.
+ (mi_cmd_target_file_delete): Likewise.
+ * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames): Fix error
+ messages.
+ (mi_cmd_stack_info_depth): Likewise.
+ (mi_cmd_stack_list_locals): Likewise.
+ (mi_cmd_stack_list_args): Likewise.
+ (mi_cmd_stack_select_frame): Likewise.
+ (mi_cmd_stack_select_frame): Likewise.
+ (mi_cmd_stack_info_frame): Likewise.
+ * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file): Fix error
+ messages.
+ (mi_cmd_file_list_exec_source_files): Likewise.
+ * mi/mi-cmd-env.c (mi_cmd_env_pwd): Fix error messages.
+ (mi_cmd_env_cd): Likewise.
+ (mi_cmd_env_path): Likewise.
+ (mi_cmd_env_dir): Likewise.
+ (mi_cmd_inferior_tty_show): Likewise.
+ * mi/mi-cmd-disas.c (mi_cmd_disassemble): Fix error messages.
+ * mi/mi-cmd-break.c (mi_cmd_break_insert): Fix error messages.
+ (mi_cmd_break_watch): Likewise.
+
2011-01-12 Thiago Jung Bauermann <bauerman@br.ibm.com>
* ppc-linux-nat.c (booke_cmp_hw_point): Fix whitespace.
while (1)
{
- int opt = mi_getopt ("mi_cmd_break_insert", argc, argv,
+ int opt = mi_getopt ("-break-insert", argc, argv,
opts, &optind, &optarg);
if (opt < 0)
break;
}
if (optind >= argc)
- error (_("mi_cmd_break_insert: Missing <location>"));
+ error (_("-break-insert: Missing <location>"));
if (optind < argc - 1)
- error (_("mi_cmd_break_insert: Garbage following <location>"));
+ error (_("-break-insert: Garbage following <location>"));
address = argv[optind];
/* Now we have what we need, let's insert the breakpoint! */
while (1)
{
- int opt = mi_getopt ("mi_cmd_break_watch", argc, argv,
+ int opt = mi_getopt ("-break-watch", argc, argv,
opts, &optind, &optarg);
if (opt < 0)
}
}
if (optind >= argc)
- error (_("mi_cmd_break_watch: Missing <expression>"));
+ error (_("-break-watch: Missing <expression>"));
if (optind < argc - 1)
- error (_("mi_cmd_break_watch: Garbage following <expression>"));
+ error (_("-break-watch: Garbage following <expression>"));
expr = argv[optind];
/* Now we have what we need, let's insert the watchpoint! */
awatch_command_wrapper (expr, FROM_TTY, 0);
break;
default:
- error (_("mi_cmd_break_watch: Unknown watchpoint type."));
+ error (_("-break-watch: Unknown watchpoint type."));
}
}
encountered. */
while (1)
{
- int opt = mi_getopt ("mi_cmd_disassemble", argc, argv, opts,
+ int opt = mi_getopt ("-data-disassemble", argc, argv, opts,
&optind, &optarg);
if (opt < 0)
break;
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 "
+ error (_("-data-disassemble: Usage: ( [-f filename -l linenum [-n "
"howmany]] | [-s startaddr -e endaddr]) [--] mode."));
if (argc != 1)
- error (_("mi_cmd_disassemble: Usage: [-f filename -l linenum "
+ error (_("-data-disassemble: Usage: [-f filename -l linenum "
"[-n howmany]] [-s startaddr -e endaddr] [--] mode."));
mode = atoi (argv[0]);
if (mode < 0 || mode > 3)
- error (_("mi_cmd_disassemble: Mode argument must be 0, 1, 2, or 3."));
+ error (_("-data-disassemble: Mode argument must be 0, 1, 2, or 3."));
/* Convert the mode into a set of disassembly flags */
{
s = lookup_symtab (file_string);
if (s == NULL)
- error (_("mi_cmd_disassemble: Invalid filename."));
+ error (_("-data-disassemble: Invalid filename."));
if (!find_line_pc (s, line_num, &start))
- error (_("mi_cmd_disassemble: Invalid line number"));
+ error (_("-data-disassemble: Invalid line number"));
if (find_pc_partial_function (start, NULL, &low, &high) == 0)
- error (_("mi_cmd_disassemble: "
+ error (_("-data-disassemble: "
"No function contains specified address"));
}
mi_cmd_env_pwd (char *command, char **argv, int argc)
{
if (argc > 0)
- error (_("mi_cmd_env_pwd: No arguments required"));
+ error (_("-environment-pwd: No arguments required"));
if (mi_version (uiout) < 2)
{
/* Otherwise the mi level is 2 or higher. */
if (! getcwd (gdb_dirbuf, sizeof (gdb_dirbuf)))
- error (_("mi_cmd_env_pwd: error finding name of working directory: %s"),
+ error (_("-environment-pwd: error finding name of working directory: %s"),
safe_strerror (errno));
ui_out_field_string (uiout, "cwd", gdb_dirbuf);
mi_cmd_env_cd (char *command, char **argv, int argc)
{
if (argc == 0 || argc > 1)
- error (_("mi_cmd_env_cd: Usage DIRECTORY"));
+ error (_("-environment-cd: Usage DIRECTORY"));
env_execute_cli_command ("cd", argv[0]);
}
/* Otherwise the mi level is 2 or higher. */
while (1)
{
- int opt = mi_getopt ("mi_cmd_env_path", argc, argv, opts,
+ int opt = mi_getopt ("-environment-path", argc, argv, opts,
&optind, &optarg);
if (opt < 0)
/* Otherwise mi level is 2 or higher. */
while (1)
{
- int opt = mi_getopt ("mi_cmd_env_dir", argc, argv, opts,
+ int opt = mi_getopt ("-environment-directory", argc, argv, opts,
&optind, &optarg);
if (opt < 0)
{
const char *inferior_io_terminal = get_inferior_io_terminal ();
- if ( !mi_valid_noargs ("mi_cmd_inferior_tty_show", argc, argv))
- error (_("mi_cmd_inferior_tty_show: Usage: No args"));
+ if ( !mi_valid_noargs ("-inferior-tty-show", argc, argv))
+ error (_("-inferior-tty-show: Usage: No args"));
if (inferior_io_terminal)
ui_out_field_string (uiout, "inferior_tty_terminal", inferior_io_terminal);
{
struct symtab_and_line st;
- if (!mi_valid_noargs ("mi_cmd_file_list_exec_source_file", argc, argv))
- error (_("mi_cmd_file_list_exec_source_file: Usage: No args"));
+ if (!mi_valid_noargs ("-file-list-exec-source-file", argc, argv))
+ error (_("-file-list-exec-source-file: Usage: No args"));
/* Set the default file and line, also get them */
set_default_source_symtab_and_line ();
Apparently, filename does not need to be tested for NULL.
The documentation in symtab.h suggests it will always be correct */
if (!st.symtab)
- error (_("mi_cmd_file_list_exec_source_file: No symtab"));
+ error (_("-file-list-exec-source-file: No symtab"));
/* Extract the fullname if it is not known yet */
symtab_to_fullname (st.symtab);
struct symtab *s;
struct objfile *objfile;
- if (!mi_valid_noargs ("mi_cmd_file_list_exec_source_files", argc, argv))
- error (_("mi_cmd_file_list_exec_source_files: Usage: No args"));
+ if (!mi_valid_noargs ("-file-list-exec-source-files", argc, argv))
+ error (_("-file-list-exec-source-files: Usage: No args"));
/* Print the table header */
ui_out_begin (uiout, ui_out_type_list, "files");
struct frame_info *fi;
if (argc > 2 || argc == 1)
- error (_("mi_cmd_stack_list_frames: Usage: [FRAME_LOW FRAME_HIGH]"));
+ error (_("-stack-list-frames: Usage: [FRAME_LOW FRAME_HIGH]"));
if (argc == 2)
{
i++, fi = get_prev_frame (fi));
if (fi == NULL)
- error (_("mi_cmd_stack_list_frames: Not enough frames in stack."));
+ error (_("-stack-list-frames: Not enough frames in stack."));
cleanup_stack = make_cleanup_ui_out_list_begin_end (uiout, "stack");
struct frame_info *fi;
if (argc > 1)
- error (_("mi_cmd_stack_info_depth: Usage: [MAX_DEPTH]"));
+ error (_("-stack-info-depth: Usage: [MAX_DEPTH]"));
if (argc == 1)
frame_high = atoi (argv[0]);
struct frame_info *frame;
if (argc != 1)
- error (_("mi_cmd_stack_list_locals: Usage: PRINT_VALUES"));
+ error (_("-stack-list-locals: Usage: PRINT_VALUES"));
frame = get_selected_frame (NULL);
enum print_values print_values;
if (argc < 1 || argc > 3 || argc == 2)
- error (_("mi_cmd_stack_list_args: Usage: "
+ error (_("-stack-list-arguments: Usage: "
"PRINT_VALUES [FRAME_LOW FRAME_HIGH]"));
if (argc == 3)
i++, fi = get_prev_frame (fi));
if (fi == NULL)
- error (_("mi_cmd_stack_list_args: Not enough frames in stack."));
+ error (_("-stack-list-arguments: Not enough frames in stack."));
cleanup_stack_args
= make_cleanup_ui_out_list_begin_end (uiout, "stack-args");
mi_cmd_stack_select_frame (char *command, char **argv, int argc)
{
if (argc == 0 || argc > 1)
- error (_("mi_cmd_stack_select_frame: Usage: FRAME_SPEC"));
+ error (_("-stack-select-frame: Usage: FRAME_SPEC"));
select_frame_command (argv[0], 1 /* not used */ );
}
mi_cmd_stack_info_frame (char *command, char **argv, int argc)
{
if (argc > 0)
- error (_("mi_cmd_stack_info_frame: No arguments required"));
+ error (_("-stack-info-frame: No arguments required"));
print_frame_info (get_selected_frame (NULL), 1, LOC_AND_ADDRESS, 0);
}
{
{ 0, 0, 0 }
};
- static const char *prefix = "mi_cmd_target_file_get";
+ static const char *prefix = "-target-file-get";
if (mi_getopt (prefix, argc, argv, opts, &optind, &optarg) != -1
|| optind != argc - 2)
- error (_("mi_cmd_target_file_get: Usage: REMOTE_FILE LOCAL_FILE"));
+ error (_("-target-file-get: Usage: REMOTE_FILE LOCAL_FILE"));
remote_file = argv[optind];
local_file = argv[optind + 1];
{
{ 0, 0, 0 }
};
- static const char *prefix = "mi_cmd_target_file_put";
+ static const char *prefix = "-target-file-put";
if (mi_getopt (prefix, argc, argv, opts, &optind, &optarg) != -1
|| optind != argc - 2)
- error (_("mi_cmd_target_file_put: Usage: LOCAL_FILE REMOTE_FILE"));
+ error (_("-target-file-put: Usage: LOCAL_FILE REMOTE_FILE"));
local_file = argv[optind];
remote_file = argv[optind + 1];
{
{ 0, 0, 0 }
};
- static const char *prefix = "mi_cmd_target_file_delete";
+ static const char *prefix = "-target-file-delete";
if (mi_getopt (prefix, argc, argv, opts, &optind, &optarg) != -1
|| optind != argc - 1)
- error (_("mi_cmd_target_file_delete: Usage: REMOTE_FILE"));
+ error (_("-target-file-delete: Usage: REMOTE_FILE"));
remote_file = argv[optind];
if (argc != 3)
{
- /* mi_error_message = xstrprintf ("mi_cmd_var_create: Usage:
+ /* mi_error_message = xstrprintf ("-var-create: Usage:
...."); return MI_CMD_ERROR; */
- error (_("mi_cmd_var_create: Usage: NAME FRAME EXPRESSION."));
+ error (_("-var-create: Usage: NAME FRAME EXPRESSION."));
}
name = xstrdup (argv[0]);
name = varobj_gen_name ();
}
else if (!isalpha (*name))
- error (_("mi_cmd_var_create: name of object must begin with a letter"));
+ error (_("-var-create: name of object must begin with a letter"));
if (strcmp (frame, "*") == 0)
var_type = USE_CURRENT_FRAME;
var = varobj_create (name, expr, frameaddr, var_type);
if (var == NULL)
- error (_("mi_cmd_var_create: unable to create variable object"));
+ error (_("-var-create: unable to create variable object"));
print_varobj (var, PRINT_ALL_VALUES, 0 /* don't print expression */);
struct cleanup *old_cleanups;
if (argc < 1 || argc > 2)
- error (_("mi_cmd_var_delete: Usage: [-c] EXPRESSION."));
+ error (_("-var-delete: Usage: [-c] EXPRESSION."));
name = xstrdup (argv[0]);
/* Add cleanup for name. Must be free_current_contents as
if (argc == 1)
{
if (strcmp (name, "-c") == 0)
- error (_("mi_cmd_var_delete: Missing required "
+ error (_("-var-delete: Missing required "
"argument after '-c': variable object name"));
if (*name == '-')
- error (_("mi_cmd_var_delete: Illegal variable object name"));
+ error (_("-var-delete: Illegal variable object name"));
}
/* If we have 2 arguments they must be '-c' followed by a string
if (argc == 2)
{
if (strcmp (name, "-c") != 0)
- error (_("mi_cmd_var_delete: Invalid option."));
+ error (_("-var-delete: Invalid option."));
children_only_p = 1;
do_cleanups (old_cleanups);
name = xstrdup (argv[1]);
char *val;
if (argc != 2)
- error (_("mi_cmd_var_set_format: Usage: NAME FORMAT."));
+ error (_("-var-set-format: Usage: NAME FORMAT."));
/* Get varobj handle, if a valid var obj name was specified */
var = varobj_get_handle (argv[0]);
struct varobj *var;
if (argc != 1)
- error (_("mi_cmd_var_show_format: Usage: NAME."));
+ error (_("-var-show-format: Usage: NAME."));
/* Get varobj handle, if a valid var obj name was specified */
var = varobj_get_handle (argv[0]);
struct varobj *var;
if (argc != 1)
- error (_("mi_cmd_var_info_num_children: Usage: NAME."));
+ error (_("-var-info-num-children: Usage: NAME."));
/* Get varobj handle, if a valid var obj name was specified */
var = varobj_get_handle (argv[0]);
char *display_hint;
if (argc < 1 || argc > 4)
- error (_("mi_cmd_var_list_children: Usage: "
+ error (_("-var-list-children: Usage: "
"[PRINT_VALUES] NAME [FROM TO]"));
/* Get varobj handle, if a valid var obj name was specified */
struct varobj *var;
if (argc != 1)
- error (_("mi_cmd_var_info_type: Usage: NAME."));
+ error (_("-var-info-type: Usage: NAME."));
/* Get varobj handle, if a valid var obj name was specified */
var = varobj_get_handle (argv[0]);
struct varobj *var;
if (argc != 1)
- error (_("mi_cmd_var_info_expression: Usage: NAME."));
+ error (_("-var-info-expression: Usage: NAME."));
/* Get varobj handle, if a valid var obj name was specified */
var = varobj_get_handle (argv[0]);
struct varobj *var;
if (argc != 1)
- error (_("mi_cmd_var_show_attributes: Usage: NAME."));
+ error (_("-var-show-attributes: Usage: NAME."));
/* Get varobj handle, if a valid var obj name was specified */
var = varobj_get_handle (argv[0]);
char *expression, *val;
if (argc != 2)
- error (_("mi_cmd_var_assign: Usage: NAME EXPRESSION."));
+ error (_("-var-assign: Usage: NAME EXPRESSION."));
/* Get varobj handle, if a valid var obj name was specified */
var = varobj_get_handle (argv[0]);
if (!varobj_editable_p (var))
- error (_("mi_cmd_var_assign: Variable object is not editable"));
+ error (_("-var-assign: Variable object is not editable"));
expression = xstrdup (argv[1]);
if (!varobj_set_value (var, expression))
- error (_("mi_cmd_var_assign: Could not assign "
+ error (_("-var-assign: Could not assign "
"expression to variable object"));
val = varobj_get_value (var);
enum print_values print_values;
if (argc != 1 && argc != 2)
- error (_("mi_cmd_var_update: Usage: [PRINT_VALUES] NAME."));
+ error (_("-var-update: Usage: [PRINT_VALUES] NAME."));
if (argc == 1)
name = argv[0];
mi_cmd_enable_pretty_printing (char *command, char **argv, int argc)
{
if (argc != 0)
- error (_("mi_cmd_enable_pretty_printing: no arguments allowed"));
+ error (_("-enable-pretty-printing: no arguments allowed"));
varobj_enable_pretty_printing ();
}
int from, to;
if (argc != 3)
- error (_("mi_cmd_var_set_update_range: Usage: VAROBJ FROM TO"));
+ error (_("-var-set-update-range: Usage: VAROBJ FROM TO"));
var = varobj_get_handle (argv[0]);
from = atoi (argv[1]);
struct cleanup *old_chain;
if (argc < 2)
- error (_("mi_cmd_interpreter_exec: "
+ error (_("-interpreter-exec: "
"Usage: -interpreter-exec interp command"));
interp_to_use = interp_lookup (argv[0]);
if (interp_to_use == NULL)
- error (_("mi_cmd_interpreter_exec: could not find interpreter \"%s\""),
+ error (_("-interpreter-exec: could not find interpreter \"%s\""),
argv[0]);
if (!interp_exec_p (interp_to_use))
- error (_("mi_cmd_interpreter_exec: interpreter \"%s\" "
+ error (_("-interpreter-exec: interpreter \"%s\" "
"does not support command execution"),
argv[0]);
char *mi_error_message;
if (argc != 1)
- error (_("mi_cmd_thread_select: USAGE: threadnum."));
+ error (_("-thread-select: USAGE: threadnum."));
rc = gdb_thread_select (uiout, argv[0], &mi_error_message);
char *mi_error_message;
if (argc != 0)
- error ("mi_cmd_thread_list_ids: No arguments required.");
+ error ("-thread-list-ids: No arguments required.");
rc = gdb_list_thread_ids (uiout, &mi_error_message);
continue;
changed = register_changed_p (regnum, prev_regs, this_regs);
if (changed < 0)
- error ("mi_cmd_data_list_changed_registers: "
+ error ("-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: "
+ error ("-data-list-changed-registers: "
"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: "
+ error ("-data-list-register-values: Usage: "
"-data-list-register-values <format> [<regnum1>...<regnumN>]");
format = (int) argv[0][0];
numregs = gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch);
if (argc == 0)
- error ("mi_cmd_data_write_register_values: Usage: -data-write-register-"
+ error ("-data-write-register-values: Usage: -data-write-register-"
"values <format> [<regnum1> <value1>...<regnumN> <valueN>]");
format = (int) argv[0][0];
if (!target_has_registers)
- error ("mi_cmd_data_write_register_values: No registers.");
+ error ("-data-write-register-values: No registers.");
if (!(argc - 1))
- error ("mi_cmd_data_write_register_values: No regs and values specified.");
+ error ("-data-write-register-values: No regs and values specified.");
if ((argc - 1) % 2)
- error ("mi_cmd_data_write_register_values: "
+ error ("-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: "
+ error ("-data-evaluate-expression: "
"Usage: -data-evaluate-expression expression");
}
while (1)
{
- int opt = mi_getopt ("mi_cmd_data_read_memory", argc, argv, opts,
+ int opt = mi_getopt ("-data-read-memory", argc, argv, opts,
&optind, &optarg);
if (opt < 0)
argc -= optind;
if (argc < 5 || argc > 6)
- error ("mi_cmd_data_read_memory: Usage: "
+ error ("-data-read-memory: Usage: "
"ADDR WORD-FORMAT WORD-SIZE NR-ROWS NR-COLS [ASCHAR].");
/* Extract all the arguments. */
/* The number of rows. */
nr_rows = atol (argv[3]);
if (nr_rows <= 0)
- error ("mi_cmd_data_read_memory: invalid number of rows.");
+ error ("-data-read-memory: invalid number of rows.");
/* Number of bytes per row. */
nr_cols = atol (argv[4]);
if (nr_cols <= 0)
- error ("mi_cmd_data_read_memory: invalid number of columns.");
+ error ("-data-read-memory: invalid number of columns.");
/* The un-printable character when printing ascii. */
if (argc == 6)
while (1)
{
- int opt = mi_getopt ("mi_cmd_data_read_memory_bytes", argc, argv, opts,
+ int opt = mi_getopt ("-data-read-memory-bytes", argc, argv, opts,
&optind, &optarg);
if (opt < 0)
break;
while (1)
{
- int opt = mi_getopt ("mi_cmd_data_write_memory", argc, argv, opts,
+ int opt = mi_getopt ("-data-write-memory", argc, argv, opts,
&optind, &optarg);
if (opt < 0)
argc -= optind;
if (argc != 4)
- error ("mi_cmd_data_write_memory: Usage: "
+ error ("-data-write-memory: Usage: "
"[-o COLUMN_OFFSET] ADDR FORMAT WORD-SIZE VALUE.");
/* Extract all the arguments. */
return;
usage_error:
- error ("mi_cmd_enable_timings: Usage: %s {yes|no}", command);
+ error ("-enable-timings: Usage: %s {yes|no}", command);
}
void
struct cleanup *cleanup_stack, *cleanup_tuple;
if (argc != 1)
- error (_("mi_cmd_symbol_list_lines: Usage: SOURCE_FILENAME"));
+ error (_("-symbol-list-lines: Usage: SOURCE_FILENAME"));
filename = argv[0];
s = lookup_symtab (filename);
if (s == NULL)
- error (_("mi_cmd_symbol_list_lines: Unknown source file name."));
+ error (_("-symbol-list-lines: Unknown source file name."));
/* Now, dump the associated line table. The pc addresses are already
sorted by increasing values in the symbol table, so no need to
+2011-01-12 Tom Tromey <tromey@redhat.com>
+
+ * gdb.mi/gdb2549.exp: Update for error message changes.
+ * gdb.mi/mi-cli.exp: Likewise.
+ * gdb.mi/mi-disassemble.exp: Likewise.
+ * gdb.mi/mi-pthreads.exp: Likewise.
+ * gdb.mi/mi-regs.exp: Likewise.
+ * gdb.mi/mi-stack.exp: Likewise.
+ * gdb.mi/mi-var-block.exp: Likewise.
+ * gdb.mi/mi-var-cmd.exp: Likewise.
+ * gdb.mi/mi2-cli.exp: Likewise.
+ * gdb.mi/mi2-disassemble.exp: Likewise.
+ * gdb.mi/mi2-pthreads.exp: Likewise.
+ * gdb.mi/mi2-regs.exp: Likewise.
+ * gdb.mi/mi2-stack.exp: Likewise.
+ * gdb.mi/mi2-var-block.exp: Likewise.
+ * gdb.mi/mi2-var-cmd.exp: Likewise.
+
2011-01-12 Andrew Burgess <aburgess@broadcom.com>
Jan Kratochvil <jan.kratochvil@redhat.com>
proc register_tests_no_exec { } {
# Test the generic IDT chip.
mi_gdb_test "111-data-list-register-values" \
- ".*111\\^error,msg=\"mi_cmd_data_list_register_values: Usage: -data-list-register-values <format> \\\[<regnum1>...<regnumN>\\\]\"" \
+ ".*111\\^error,msg=\"-data-list-register-values: Usage: -data-list-register-values <format> \\\[<regnum1>...<regnumN>\\\]\"" \
"wrong arguments"
mi_gdb_test "111-data-list-register-values x" \
}
mi_gdb_test "-interpreter-exec" \
- {\^error,msg="mi_cmd_interpreter_exec: Usage: -interpreter-exec interp command"} \
+ {\^error,msg="-interpreter-exec: Usage: -interpreter-exec interp command"} \
"-interpreter-exec with no arguments"
mi_gdb_test "-interpreter-exec console" \
- {\^error,msg="mi_cmd_interpreter_exec: Usage: -interpreter-exec interp command"} \
+ {\^error,msg="-interpreter-exec: Usage: -interpreter-exec interp command"} \
"-interpreter-exec with one argument"
mi_gdb_test "-interpreter-exec bogus command" \
- {\^error,msg="mi_cmd_interpreter_exec: could not find interpreter \\\"bogus\\\""} \
+ {\^error,msg="-interpreter-exec: could not find interpreter \\\"bogus\\\""} \
"-interpreter-exec with bogus interpreter"
set msg {Undefined command: \\\"bogus\\\"\. Try \\\"help\\\"\.}
# -data-disassembly -f basics.c -l 32 -- 9
mi_gdb_test "123-data-disassemble -f foo -l abc -n 0 -- 0" \
- "123\\^error,msg=\"mi_cmd_disassemble: Invalid filename.\"" \
+ "123\\^error,msg=\"-data-disassemble: Invalid filename.\"" \
"data-disassemble bogus filename"
mi_gdb_test "321-data-disassemble -s foo -e bar -- 0" \
"data-disassemble bogus address"
mi_gdb_test "456-data-disassemble -s \$pc -f basics.c -- 0" \
- "456\\^error,msg=\"mi_cmd_disassemble: Usage: \\( .-f filename -l linenum .-n howmany.. \\| .-s startaddr -e endaddr.\\) .--. mode.\"" \
+ "456\\^error,msg=\"-data-disassemble: Usage: \\( .-f filename -l linenum .-n howmany.. \\| .-s startaddr -e endaddr.\\) .--. mode.\"" \
"data-disassemble mix different args"
mi_gdb_test "789-data-disassemble -f basics.c -l $line_main_body -- 9" \
- "789\\^error,msg=\"mi_cmd_disassemble: Mode argument must be 0, 1, 2, or 3.\"" \
+ "789\\^error,msg=\"-data-disassemble: Mode argument must be 0, 1, 2, or 3.\"" \
"data-disassemble wrong mode arg"
}
set thread_list [get_mi_thread_list "in check_mi_thread_command_set"]
mi_gdb_test "-thread-select" \
- {\^error,msg="mi_cmd_thread_select: USAGE: threadnum."} \
+ {\^error,msg="-thread-select: USAGE: threadnum."} \
"check_mi_thread_command_set: -thread-select"
mi_gdb_test "-thread-select 123456789" \
proc sparc_register_tests_no_exec { } {
# Test the generic IDT chip.
mi_gdb_test "111-data-list-register-values" \
- ".*111\\^error,msg=\"mi_cmd_data_list_register_values: Usage: -data-list-register-values <format> \\\[<regnum1>...<regnumN>\\\]\"" \
+ ".*111\\^error,msg=\"-data-list-register-values: Usage: -data-list-register-values <format> \\\[<regnum1>...<regnumN>\\\]\"" \
"wrong arguments"
mi_gdb_test "111-data-list-register-values x" \
"stack frame listing 1 3"
mi_gdb_test "234-stack-list-frames 1" \
- "234\\^error,msg=\"mi_cmd_stack_list_frames: Usage.*FRAME_LOW FRAME_HIGH.*\"" \
+ "234\\^error,msg=\"-stack-list-frames: Usage.*FRAME_LOW FRAME_HIGH.*\"" \
"stack frame listing wrong"
mi_gdb_test "235-stack-info-frame" \
"stack args listing 1 1 3"
mi_gdb_test "234-stack-list-arguments" \
- "234\\^error,msg=\"mi_cmd_stack_list_args: Usage.*PRINT_VALUES.*FRAME_LOW FRAME_HIGH.*\"" \
+ "234\\^error,msg=\"-stack-list-arguments: Usage.*PRINT_VALUES.*FRAME_LOW FRAME_HIGH.*\"" \
"stack args listing wrong"
mi_gdb_test "235-stack-list-arguments 1 1 300" \
"stack info-depth 99"
mi_gdb_test "231-stack-info-depth 99 99" \
- "231\\^error,msg=\"mi_cmd_stack_info_depth: Usage: .MAX_DEPTH.\"" \
+ "231\\^error,msg=\"-stack-info-depth: Usage: .MAX_DEPTH.\"" \
"stack info-depth wrong usage"
}
"stack locals listing, simple types: names and values, complex type: names and types"
mi_gdb_test "234-stack-list-locals" \
- "234\\^error,msg=\"mi_cmd_stack_list_locals: Usage.*PRINT_VALUES.*\"" \
+ "234\\^error,msg=\"-stack-list-locals: Usage.*PRINT_VALUES.*\"" \
"stack locals listing wrong"
mi_gdb_test "232-stack-select-frame 1" \
mi_create_varobj "cb" "cb" "create local variable cb"
mi_gdb_test "-var-create foo * foo" \
- "\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
+ "\\^error,msg=\"-var-create: unable to create variable object\"" \
"try to create local variable foo"
# step to "foo = 123;"
# Desc: Create non-existent variable
mi_gdb_test "112-var-create bogus_unknown_variable * bogus_unknown_variable" \
- "112\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
+ "112\\^error,msg=\"-var-create: unable to create variable object\"" \
"create non-existent variable"
# Test: c_variable-1.3
# Desc: Create out of scope variable
mi_gdb_test "113-var-create argc * argc" \
- "113\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
+ "113\\^error,msg=\"-var-create: unable to create variable object\"" \
"create out of scope variable"
mi_runto do_locals_tests
# Type names (like int, long, etc..) are all proper expressions to gdb.
# make sure variable code does not allow users to create variables, though.
mi_gdb_test "-var-create int * int" \
- "&\"Attempt to use a type name as an expression.\\\\n\".*\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
+ "&\"Attempt to use a type name as an expression.\\\\n\".*\\^error,msg=\"-var-create: unable to create variable object\"" \
"create int"
#
###
mi_gdb_test "-var-assign global_simple 0" \
- "\\^error,msg=\"mi_cmd_var_assign: Variable object is not editable\"" \
+ "\\^error,msg=\"-var-assign: Variable object is not editable\"" \
"assign to global_simple"
mi_gdb_test "-var-assign linteger 3333" \
# Test: c_variable-2.11
# Desc: create do_locals_tests local in subroutine1
mi_gdb_test "-var-create linteger * linteger" \
- "\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
+ "\\^error,msg=\"-var-create: unable to create variable object\"" \
"create linteger"
mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
}
mi_gdb_test "-interpreter-exec" \
- {\^error,msg="mi_cmd_interpreter_exec: Usage: -interpreter-exec interp command"} \
+ {\^error,msg="-interpreter-exec: Usage: -interpreter-exec interp command"} \
"-interpreter-exec with no arguments"
mi_gdb_test "-interpreter-exec console" \
- {\^error,msg="mi_cmd_interpreter_exec: Usage: -interpreter-exec interp command"} \
+ {\^error,msg="-interpreter-exec: Usage: -interpreter-exec interp command"} \
"-interpreter-exec with one argument"
mi_gdb_test "-interpreter-exec bogus command" \
- {\^error,msg="mi_cmd_interpreter_exec: could not find interpreter \\\"bogus\\\""} \
+ {\^error,msg="-interpreter-exec: could not find interpreter \\\"bogus\\\""} \
"-interpreter-exec with bogus interpreter"
set msg {Undefined command: \\\"bogus\\\"\. Try \\\"help\\\"\.}
# -data-disassembly -f basics.c -l 32 -- 9
mi_gdb_test "123-data-disassemble -f foo -l abc -n 0 -- 0" \
- "123\\^error,msg=\"mi_cmd_disassemble: Invalid filename.\"" \
+ "123\\^error,msg=\"-data-disassemble: Invalid filename.\"" \
"data-disassemble bogus filename"
mi_gdb_test "321-data-disassemble -s foo -e bar -- 0" \
"data-disassemble bogus address"
mi_gdb_test "456-data-disassemble -s \$pc -f basics.c -- 0" \
- "456\\^error,msg=\"mi_cmd_disassemble: Usage: \\( .-f filename -l linenum .-n howmany.. \\| .-s startaddr -e endaddr.\\) .--. mode.\"" \
+ "456\\^error,msg=\"-data-disassemble: Usage: \\( .-f filename -l linenum .-n howmany.. \\| .-s startaddr -e endaddr.\\) .--. mode.\"" \
"data-disassemble mix different args"
mi_gdb_test "789-data-disassemble -f basics.c -l $line_main_body -- 9" \
- "789\\^error,msg=\"mi_cmd_disassemble: Mode argument must be 0, 1, 2, or 3.\"" \
+ "789\\^error,msg=\"-data-disassemble: Mode argument must be 0, 1, 2, or 3.\"" \
"data-disassemble wrong mode arg"
}
set thread_list [get_mi_thread_list "in check_mi_thread_command_set"]
mi_gdb_test "-thread-select" \
- {\^error,msg="mi_cmd_thread_select: USAGE: threadnum."} \
+ {\^error,msg="-thread-select: USAGE: threadnum."} \
"check_mi_thread_command_set: -thread-select"
mi_gdb_test "-thread-select 123456789" \
proc sparc_register_tests_no_exec { } {
# Test the generic IDT chip.
mi_gdb_test "111-data-list-register-values" \
- ".*111\\^error,msg=\"mi_cmd_data_list_register_values: Usage: -data-list-register-values <format> \\\[<regnum1>...<regnumN>\\\]\"" \
+ ".*111\\^error,msg=\"-data-list-register-values: Usage: -data-list-register-values <format> \\\[<regnum1>...<regnumN>\\\]\"" \
"wrong arguments"
mi_gdb_test "111-data-list-register-values x" \
"stack frame listing 1 3"
mi_gdb_test "234-stack-list-frames 1" \
- "234\\^error,msg=\"mi_cmd_stack_list_frames: Usage.*FRAME_LOW FRAME_HIGH.*\"" \
+ "234\\^error,msg=\"-stack-list-frames: Usage.*FRAME_LOW FRAME_HIGH.*\"" \
"stack frame listing wrong"
mi_gdb_test "235-stack-info-frame" \
"stack args listing 1 1 3"
mi_gdb_test "234-stack-list-arguments" \
- "234\\^error,msg=\"mi_cmd_stack_list_args: Usage.*PRINT_VALUES.*FRAME_LOW FRAME_HIGH.*\"" \
+ "234\\^error,msg=\"-stack-list-arguments: Usage.*PRINT_VALUES.*FRAME_LOW FRAME_HIGH.*\"" \
"stack args listing wrong"
mi_gdb_test "235-stack-list-arguments 1 1 300" \
"stack info-depth 99"
mi_gdb_test "231-stack-info-depth 99 99" \
- "231\\^error,msg=\"mi_cmd_stack_info_depth: Usage: .MAX_DEPTH.\"" \
+ "231\\^error,msg=\"-stack-info-depth: Usage: .MAX_DEPTH.\"" \
"stack info-depth wrong usage"
}
"stack locals listing, simple types: names and values, complex type: names and types"
mi_gdb_test "234-stack-list-locals" \
- "234\\^error,msg=\"mi_cmd_stack_list_locals: Usage.*PRINT_VALUES.*\"" \
+ "234\\^error,msg=\"-stack-list-locals: Usage.*PRINT_VALUES.*\"" \
"stack locals listing wrong"
mi_gdb_test "232-stack-select-frame 1" \
mi_create_varobj "cb" "cb" "create local variable cb"
mi_gdb_test "-var-create foo * foo" \
- "\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
+ "\\^error,msg=\"-var-create: unable to create variable object\"" \
"create local variable foo"
# step to "foo = 123;"
# Desc: Create non-existent variable
mi_gdb_test "112-var-create bogus_unknown_variable * bogus_unknown_variable" \
- "112\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
+ "112\\^error,msg=\"-var-create: unable to create variable object\"" \
"create non-existent variable"
# Test: c_variable-1.3
# Desc: Create out of scope variable
mi_gdb_test "113-var-create argc * argc" \
- "113\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
+ "113\\^error,msg=\"-var-create: unable to create variable object\"" \
"create out of scope variable"
mi_runto do_locals_tests
# Type names (like int, long, etc..) are all proper expressions to gdb.
# make sure variable code does not allow users to create variables, though.
mi_gdb_test "-var-create int * int" \
- "&\"Attempt to use a type name as an expression.\\\\n\".*\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
+ "&\"Attempt to use a type name as an expression.\\\\n\".*\\^error,msg=\"-var-create: unable to create variable object\"" \
"create int"
#
###
mi_gdb_test "-var-assign global_simple 0" \
- "\\^error,msg=\"mi_cmd_var_assign: Variable object is not editable\"" \
+ "\\^error,msg=\"-var-assign: Variable object is not editable\"" \
"assign to global_simple"
mi_gdb_test "-var-assign linteger 3333" \
# Test: c_variable-2.11
# Desc: create do_locals_tests local in subroutine1
mi_gdb_test "-var-create linteger * linteger" \
- "\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
+ "\\^error,msg=\"-var-create: unable to create variable object\"" \
"create linteger"
mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \