* 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.
gdb/testsuite
	* 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.
This commit is contained in:
Tom Tromey 2011-01-12 21:09:39 +00:00
parent ad422571bd
commit 1b05df007b
27 changed files with 191 additions and 121 deletions

View File

@ -1,3 +1,55 @@
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> 2011-01-12 Thiago Jung Bauermann <bauerman@br.ibm.com>
* ppc-linux-nat.c (booke_cmp_hw_point): Fix whitespace. * ppc-linux-nat.c (booke_cmp_hw_point): Fix whitespace.

View File

@ -103,7 +103,7 @@ mi_cmd_break_insert (char *command, char **argv, int argc)
while (1) while (1)
{ {
int opt = mi_getopt ("mi_cmd_break_insert", argc, argv, int opt = mi_getopt ("-break-insert", argc, argv,
opts, &optind, &optarg); opts, &optind, &optarg);
if (opt < 0) if (opt < 0)
break; break;
@ -137,9 +137,9 @@ mi_cmd_break_insert (char *command, char **argv, int argc)
} }
if (optind >= argc) if (optind >= argc)
error (_("mi_cmd_break_insert: Missing <location>")); error (_("-break-insert: Missing <location>"));
if (optind < argc - 1) if (optind < argc - 1)
error (_("mi_cmd_break_insert: Garbage following <location>")); error (_("-break-insert: Garbage following <location>"));
address = argv[optind]; address = argv[optind];
/* Now we have what we need, let's insert the breakpoint! */ /* Now we have what we need, let's insert the breakpoint! */
@ -235,7 +235,7 @@ mi_cmd_break_watch (char *command, char **argv, int argc)
while (1) while (1)
{ {
int opt = mi_getopt ("mi_cmd_break_watch", argc, argv, int opt = mi_getopt ("-break-watch", argc, argv,
opts, &optind, &optarg); opts, &optind, &optarg);
if (opt < 0) if (opt < 0)
@ -251,9 +251,9 @@ mi_cmd_break_watch (char *command, char **argv, int argc)
} }
} }
if (optind >= argc) if (optind >= argc)
error (_("mi_cmd_break_watch: Missing <expression>")); error (_("-break-watch: Missing <expression>"));
if (optind < argc - 1) if (optind < argc - 1)
error (_("mi_cmd_break_watch: Garbage following <expression>")); error (_("-break-watch: Garbage following <expression>"));
expr = argv[optind]; expr = argv[optind];
/* Now we have what we need, let's insert the watchpoint! */ /* Now we have what we need, let's insert the watchpoint! */
@ -269,7 +269,7 @@ mi_cmd_break_watch (char *command, char **argv, int argc)
awatch_command_wrapper (expr, FROM_TTY, 0); awatch_command_wrapper (expr, FROM_TTY, 0);
break; break;
default: default:
error (_("mi_cmd_break_watch: Unknown watchpoint type.")); error (_("-break-watch: Unknown watchpoint type."));
} }
} }

View File

@ -94,7 +94,7 @@ mi_cmd_disassemble (char *command, char **argv, int argc)
encountered. */ encountered. */
while (1) while (1)
{ {
int opt = mi_getopt ("mi_cmd_disassemble", argc, argv, opts, int opt = mi_getopt ("-data-disassemble", argc, argv, opts,
&optind, &optarg); &optind, &optarg);
if (opt < 0) if (opt < 0)
break; break;
@ -131,16 +131,16 @@ mi_cmd_disassemble (char *command, char **argv, int argc)
if (!((line_seen && file_seen && num_seen && !start_seen && !end_seen) if (!((line_seen && file_seen && num_seen && !start_seen && !end_seen)
|| (line_seen && file_seen && !num_seen && !start_seen && !end_seen) || (line_seen && file_seen && !num_seen && !start_seen && !end_seen)
|| (!line_seen && !file_seen && !num_seen && start_seen && end_seen))) || (!line_seen && !file_seen && !num_seen && start_seen && end_seen)))
error (_("mi_cmd_disassemble: Usage: ( [-f filename -l linenum [-n " error (_("-data-disassemble: Usage: ( [-f filename -l linenum [-n "
"howmany]] | [-s startaddr -e endaddr]) [--] mode.")); "howmany]] | [-s startaddr -e endaddr]) [--] mode."));
if (argc != 1) 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.")); "[-n howmany]] [-s startaddr -e endaddr] [--] mode."));
mode = atoi (argv[0]); mode = atoi (argv[0]);
if (mode < 0 || mode > 3) 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 */ /* Convert the mode into a set of disassembly flags */
@ -157,11 +157,11 @@ mi_cmd_disassemble (char *command, char **argv, int argc)
{ {
s = lookup_symtab (file_string); s = lookup_symtab (file_string);
if (s == NULL) if (s == NULL)
error (_("mi_cmd_disassemble: Invalid filename.")); error (_("-data-disassemble: Invalid filename."));
if (!find_line_pc (s, line_num, &start)) 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) if (find_pc_partial_function (start, NULL, &low, &high) == 0)
error (_("mi_cmd_disassemble: " error (_("-data-disassemble: "
"No function contains specified address")); "No function contains specified address"));
} }

View File

@ -70,7 +70,7 @@ void
mi_cmd_env_pwd (char *command, char **argv, int argc) mi_cmd_env_pwd (char *command, char **argv, int argc)
{ {
if (argc > 0) if (argc > 0)
error (_("mi_cmd_env_pwd: No arguments required")); error (_("-environment-pwd: No arguments required"));
if (mi_version (uiout) < 2) if (mi_version (uiout) < 2)
{ {
@ -81,7 +81,7 @@ mi_cmd_env_pwd (char *command, char **argv, int argc)
/* Otherwise the mi level is 2 or higher. */ /* Otherwise the mi level is 2 or higher. */
if (! getcwd (gdb_dirbuf, sizeof (gdb_dirbuf))) 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)); safe_strerror (errno));
ui_out_field_string (uiout, "cwd", gdb_dirbuf); ui_out_field_string (uiout, "cwd", gdb_dirbuf);
@ -92,7 +92,7 @@ void
mi_cmd_env_cd (char *command, char **argv, int argc) mi_cmd_env_cd (char *command, char **argv, int argc)
{ {
if (argc == 0 || argc > 1) if (argc == 0 || argc > 1)
error (_("mi_cmd_env_cd: Usage DIRECTORY")); error (_("-environment-cd: Usage DIRECTORY"));
env_execute_cli_command ("cd", argv[0]); env_execute_cli_command ("cd", argv[0]);
} }
@ -140,7 +140,7 @@ mi_cmd_env_path (char *command, char **argv, int argc)
/* Otherwise the mi level is 2 or higher. */ /* Otherwise the mi level is 2 or higher. */
while (1) while (1)
{ {
int opt = mi_getopt ("mi_cmd_env_path", argc, argv, opts, int opt = mi_getopt ("-environment-path", argc, argv, opts,
&optind, &optarg); &optind, &optarg);
if (opt < 0) if (opt < 0)
@ -211,7 +211,7 @@ mi_cmd_env_dir (char *command, char **argv, int argc)
/* Otherwise mi level is 2 or higher. */ /* Otherwise mi level is 2 or higher. */
while (1) while (1)
{ {
int opt = mi_getopt ("mi_cmd_env_dir", argc, argv, opts, int opt = mi_getopt ("-environment-directory", argc, argv, opts,
&optind, &optarg); &optind, &optarg);
if (opt < 0) if (opt < 0)
@ -253,8 +253,8 @@ mi_cmd_inferior_tty_show (char *command, char **argv, int argc)
{ {
const char *inferior_io_terminal = get_inferior_io_terminal (); const char *inferior_io_terminal = get_inferior_io_terminal ();
if ( !mi_valid_noargs ("mi_cmd_inferior_tty_show", argc, argv)) if ( !mi_valid_noargs ("-inferior-tty-show", argc, argv))
error (_("mi_cmd_inferior_tty_show: Usage: No args")); error (_("-inferior-tty-show: Usage: No args"));
if (inferior_io_terminal) if (inferior_io_terminal)
ui_out_field_string (uiout, "inferior_tty_terminal", inferior_io_terminal); ui_out_field_string (uiout, "inferior_tty_terminal", inferior_io_terminal);

View File

@ -35,8 +35,8 @@ mi_cmd_file_list_exec_source_file (char *command, char **argv, int argc)
{ {
struct symtab_and_line st; struct symtab_and_line st;
if (!mi_valid_noargs ("mi_cmd_file_list_exec_source_file", argc, argv)) if (!mi_valid_noargs ("-file-list-exec-source-file", argc, argv))
error (_("mi_cmd_file_list_exec_source_file: Usage: No args")); error (_("-file-list-exec-source-file: Usage: No args"));
/* Set the default file and line, also get them */ /* Set the default file and line, also get them */
set_default_source_symtab_and_line (); set_default_source_symtab_and_line ();
@ -46,7 +46,7 @@ mi_cmd_file_list_exec_source_file (char *command, char **argv, int argc)
Apparently, filename does not need to be tested for NULL. Apparently, filename does not need to be tested for NULL.
The documentation in symtab.h suggests it will always be correct */ The documentation in symtab.h suggests it will always be correct */
if (!st.symtab) 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 */ /* Extract the fullname if it is not known yet */
symtab_to_fullname (st.symtab); symtab_to_fullname (st.symtab);
@ -83,8 +83,8 @@ mi_cmd_file_list_exec_source_files (char *command, char **argv, int argc)
struct symtab *s; struct symtab *s;
struct objfile *objfile; struct objfile *objfile;
if (!mi_valid_noargs ("mi_cmd_file_list_exec_source_files", argc, argv)) if (!mi_valid_noargs ("-file-list-exec-source-files", argc, argv))
error (_("mi_cmd_file_list_exec_source_files: Usage: No args")); error (_("-file-list-exec-source-files: Usage: No args"));
/* Print the table header */ /* Print the table header */
ui_out_begin (uiout, ui_out_type_list, "files"); ui_out_begin (uiout, ui_out_type_list, "files");

View File

@ -53,7 +53,7 @@ mi_cmd_stack_list_frames (char *command, char **argv, int argc)
struct frame_info *fi; struct frame_info *fi;
if (argc > 2 || argc == 1) 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) if (argc == 2)
{ {
@ -76,7 +76,7 @@ mi_cmd_stack_list_frames (char *command, char **argv, int argc)
i++, fi = get_prev_frame (fi)); i++, fi = get_prev_frame (fi));
if (fi == NULL) 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"); cleanup_stack = make_cleanup_ui_out_list_begin_end (uiout, "stack");
@ -103,7 +103,7 @@ mi_cmd_stack_info_depth (char *command, char **argv, int argc)
struct frame_info *fi; struct frame_info *fi;
if (argc > 1) if (argc > 1)
error (_("mi_cmd_stack_info_depth: Usage: [MAX_DEPTH]")); error (_("-stack-info-depth: Usage: [MAX_DEPTH]"));
if (argc == 1) if (argc == 1)
frame_high = atoi (argv[0]); frame_high = atoi (argv[0]);
@ -147,7 +147,7 @@ mi_cmd_stack_list_locals (char *command, char **argv, int argc)
struct frame_info *frame; struct frame_info *frame;
if (argc != 1) if (argc != 1)
error (_("mi_cmd_stack_list_locals: Usage: PRINT_VALUES")); error (_("-stack-list-locals: Usage: PRINT_VALUES"));
frame = get_selected_frame (NULL); frame = get_selected_frame (NULL);
@ -168,7 +168,7 @@ mi_cmd_stack_list_args (char *command, char **argv, int argc)
enum print_values print_values; enum print_values print_values;
if (argc < 1 || argc > 3 || argc == 2) if (argc < 1 || argc > 3 || argc == 2)
error (_("mi_cmd_stack_list_args: Usage: " error (_("-stack-list-arguments: Usage: "
"PRINT_VALUES [FRAME_LOW FRAME_HIGH]")); "PRINT_VALUES [FRAME_LOW FRAME_HIGH]"));
if (argc == 3) if (argc == 3)
@ -194,7 +194,7 @@ mi_cmd_stack_list_args (char *command, char **argv, int argc)
i++, fi = get_prev_frame (fi)); i++, fi = get_prev_frame (fi));
if (fi == NULL) 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 cleanup_stack_args
= make_cleanup_ui_out_list_begin_end (uiout, "stack-args"); = make_cleanup_ui_out_list_begin_end (uiout, "stack-args");
@ -399,7 +399,7 @@ void
mi_cmd_stack_select_frame (char *command, char **argv, int argc) mi_cmd_stack_select_frame (char *command, char **argv, int argc)
{ {
if (argc == 0 || argc > 1) 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 */ ); select_frame_command (argv[0], 1 /* not used */ );
} }
@ -408,7 +408,7 @@ void
mi_cmd_stack_info_frame (char *command, char **argv, int argc) mi_cmd_stack_info_frame (char *command, char **argv, int argc)
{ {
if (argc > 0) 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); print_frame_info (get_selected_frame (NULL), 1, LOC_AND_ADDRESS, 0);
} }

View File

@ -33,11 +33,11 @@ mi_cmd_target_file_get (char *command, char **argv, int argc)
{ {
{ 0, 0, 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 if (mi_getopt (prefix, argc, argv, opts, &optind, &optarg) != -1
|| optind != argc - 2) || 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]; remote_file = argv[optind];
local_file = argv[optind + 1]; local_file = argv[optind + 1];
@ -57,11 +57,11 @@ mi_cmd_target_file_put (char *command, char **argv, int argc)
{ {
{ 0, 0, 0 } { 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 if (mi_getopt (prefix, argc, argv, opts, &optind, &optarg) != -1
|| optind != argc - 2) || 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]; local_file = argv[optind];
remote_file = argv[optind + 1]; remote_file = argv[optind + 1];
@ -81,11 +81,11 @@ mi_cmd_target_file_delete (char *command, char **argv, int argc)
{ {
{ 0, 0, 0 } { 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 if (mi_getopt (prefix, argc, argv, opts, &optind, &optarg) != -1
|| optind != argc - 1) || optind != argc - 1)
error (_("mi_cmd_target_file_delete: Usage: REMOTE_FILE")); error (_("-target-file-delete: Usage: REMOTE_FILE"));
remote_file = argv[optind]; remote_file = argv[optind];

View File

@ -108,9 +108,9 @@ mi_cmd_var_create (char *command, char **argv, int argc)
if (argc != 3) if (argc != 3)
{ {
/* mi_error_message = xstrprintf ("mi_cmd_var_create: Usage: /* mi_error_message = xstrprintf ("-var-create: Usage:
...."); return MI_CMD_ERROR; */ ...."); 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 = xstrdup (argv[0]);
@ -130,7 +130,7 @@ mi_cmd_var_create (char *command, char **argv, int argc)
name = varobj_gen_name (); name = varobj_gen_name ();
} }
else if (!isalpha (*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) if (strcmp (frame, "*") == 0)
var_type = USE_CURRENT_FRAME; var_type = USE_CURRENT_FRAME;
@ -150,7 +150,7 @@ mi_cmd_var_create (char *command, char **argv, int argc)
var = varobj_create (name, expr, frameaddr, var_type); var = varobj_create (name, expr, frameaddr, var_type);
if (var == NULL) 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 */); print_varobj (var, PRINT_ALL_VALUES, 0 /* don't print expression */);
@ -169,7 +169,7 @@ mi_cmd_var_delete (char *command, char **argv, int argc)
struct cleanup *old_cleanups; struct cleanup *old_cleanups;
if (argc < 1 || argc > 2) if (argc < 1 || argc > 2)
error (_("mi_cmd_var_delete: Usage: [-c] EXPRESSION.")); error (_("-var-delete: Usage: [-c] EXPRESSION."));
name = xstrdup (argv[0]); name = xstrdup (argv[0]);
/* Add cleanup for name. Must be free_current_contents as /* Add cleanup for name. Must be free_current_contents as
@ -181,10 +181,10 @@ mi_cmd_var_delete (char *command, char **argv, int argc)
if (argc == 1) if (argc == 1)
{ {
if (strcmp (name, "-c") == 0) if (strcmp (name, "-c") == 0)
error (_("mi_cmd_var_delete: Missing required " error (_("-var-delete: Missing required "
"argument after '-c': variable object name")); "argument after '-c': variable object name"));
if (*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 we have 2 arguments they must be '-c' followed by a string
@ -192,7 +192,7 @@ mi_cmd_var_delete (char *command, char **argv, int argc)
if (argc == 2) if (argc == 2)
{ {
if (strcmp (name, "-c") != 0) if (strcmp (name, "-c") != 0)
error (_("mi_cmd_var_delete: Invalid option.")); error (_("-var-delete: Invalid option."));
children_only_p = 1; children_only_p = 1;
do_cleanups (old_cleanups); do_cleanups (old_cleanups);
name = xstrdup (argv[1]); name = xstrdup (argv[1]);
@ -246,7 +246,7 @@ mi_cmd_var_set_format (char *command, char **argv, int argc)
char *val; char *val;
if (argc != 2) 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 */ /* Get varobj handle, if a valid var obj name was specified */
var = varobj_get_handle (argv[0]); var = varobj_get_handle (argv[0]);
@ -314,7 +314,7 @@ mi_cmd_var_show_format (char *command, char **argv, int argc)
struct varobj *var; struct varobj *var;
if (argc != 1) 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 */ /* Get varobj handle, if a valid var obj name was specified */
var = varobj_get_handle (argv[0]); var = varobj_get_handle (argv[0]);
@ -331,7 +331,7 @@ mi_cmd_var_info_num_children (char *command, char **argv, int argc)
struct varobj *var; struct varobj *var;
if (argc != 1) 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 */ /* Get varobj handle, if a valid var obj name was specified */
var = varobj_get_handle (argv[0]); var = varobj_get_handle (argv[0]);
@ -403,7 +403,7 @@ mi_cmd_var_list_children (char *command, char **argv, int argc)
char *display_hint; char *display_hint;
if (argc < 1 || argc > 4) if (argc < 1 || argc > 4)
error (_("mi_cmd_var_list_children: Usage: " error (_("-var-list-children: Usage: "
"[PRINT_VALUES] NAME [FROM TO]")); "[PRINT_VALUES] NAME [FROM TO]"));
/* Get varobj handle, if a valid var obj name was specified */ /* Get varobj handle, if a valid var obj name was specified */
@ -469,7 +469,7 @@ mi_cmd_var_info_type (char *command, char **argv, int argc)
struct varobj *var; struct varobj *var;
if (argc != 1) 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 */ /* Get varobj handle, if a valid var obj name was specified */
var = varobj_get_handle (argv[0]); var = varobj_get_handle (argv[0]);
@ -501,7 +501,7 @@ mi_cmd_var_info_expression (char *command, char **argv, int argc)
struct varobj *var; struct varobj *var;
if (argc != 1) 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 */ /* Get varobj handle, if a valid var obj name was specified */
var = varobj_get_handle (argv[0]); var = varobj_get_handle (argv[0]);
@ -520,7 +520,7 @@ mi_cmd_var_show_attributes (char *command, char **argv, int argc)
struct varobj *var; struct varobj *var;
if (argc != 1) 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 */ /* Get varobj handle, if a valid var obj name was specified */
var = varobj_get_handle (argv[0]); var = varobj_get_handle (argv[0]);
@ -610,18 +610,18 @@ mi_cmd_var_assign (char *command, char **argv, int argc)
char *expression, *val; char *expression, *val;
if (argc != 2) 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 */ /* Get varobj handle, if a valid var obj name was specified */
var = varobj_get_handle (argv[0]); var = varobj_get_handle (argv[0]);
if (!varobj_editable_p (var)) 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]); expression = xstrdup (argv[1]);
if (!varobj_set_value (var, expression)) if (!varobj_set_value (var, expression))
error (_("mi_cmd_var_assign: Could not assign " error (_("-var-assign: Could not assign "
"expression to variable object")); "expression to variable object"));
val = varobj_get_value (var); val = varobj_get_value (var);
@ -672,7 +672,7 @@ mi_cmd_var_update (char *command, char **argv, int argc)
enum print_values print_values; enum print_values print_values;
if (argc != 1 && argc != 2) if (argc != 1 && argc != 2)
error (_("mi_cmd_var_update: Usage: [PRINT_VALUES] NAME.")); error (_("-var-update: Usage: [PRINT_VALUES] NAME."));
if (argc == 1) if (argc == 1)
name = argv[0]; name = argv[0];
@ -819,7 +819,7 @@ void
mi_cmd_enable_pretty_printing (char *command, char **argv, int argc) mi_cmd_enable_pretty_printing (char *command, char **argv, int argc)
{ {
if (argc != 0) if (argc != 0)
error (_("mi_cmd_enable_pretty_printing: no arguments allowed")); error (_("-enable-pretty-printing: no arguments allowed"));
varobj_enable_pretty_printing (); varobj_enable_pretty_printing ();
} }
@ -830,7 +830,7 @@ mi_cmd_var_set_update_range (char *command, char **argv, int argc)
int from, to; int from, to;
if (argc != 3) 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]); var = varobj_get_handle (argv[0]);
from = atoi (argv[1]); from = atoi (argv[1]);

View File

@ -192,16 +192,16 @@ mi_cmd_interpreter_exec (char *command, char **argv, int argc)
struct cleanup *old_chain; struct cleanup *old_chain;
if (argc < 2) if (argc < 2)
error (_("mi_cmd_interpreter_exec: " error (_("-interpreter-exec: "
"Usage: -interpreter-exec interp command")); "Usage: -interpreter-exec interp command"));
interp_to_use = interp_lookup (argv[0]); interp_to_use = interp_lookup (argv[0]);
if (interp_to_use == NULL) if (interp_to_use == NULL)
error (_("mi_cmd_interpreter_exec: could not find interpreter \"%s\""), error (_("-interpreter-exec: could not find interpreter \"%s\""),
argv[0]); argv[0]);
if (!interp_exec_p (interp_to_use)) if (!interp_exec_p (interp_to_use))
error (_("mi_cmd_interpreter_exec: interpreter \"%s\" " error (_("-interpreter-exec: interpreter \"%s\" "
"does not support command execution"), "does not support command execution"),
argv[0]); argv[0]);

View File

@ -471,7 +471,7 @@ mi_cmd_thread_select (char *command, char **argv, int argc)
char *mi_error_message; char *mi_error_message;
if (argc != 1) 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); rc = gdb_thread_select (uiout, argv[0], &mi_error_message);
@ -489,7 +489,7 @@ mi_cmd_thread_list_ids (char *command, char **argv, int argc)
char *mi_error_message; char *mi_error_message;
if (argc != 0) 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); rc = gdb_list_thread_ids (uiout, &mi_error_message);
@ -984,7 +984,7 @@ mi_cmd_data_list_changed_registers (char *command, char **argv, int argc)
continue; continue;
changed = register_changed_p (regnum, prev_regs, this_regs); changed = register_changed_p (regnum, prev_regs, this_regs);
if (changed < 0) if (changed < 0)
error ("mi_cmd_data_list_changed_registers: " error ("-data-list-changed-registers: "
"Unable to read register contents."); "Unable to read register contents.");
else if (changed) else if (changed)
ui_out_field_int (uiout, NULL, regnum); ui_out_field_int (uiout, NULL, regnum);
@ -1003,7 +1003,7 @@ mi_cmd_data_list_changed_registers (char *command, char **argv, int argc)
{ {
changed = register_changed_p (regnum, prev_regs, this_regs); changed = register_changed_p (regnum, prev_regs, this_regs);
if (changed < 0) if (changed < 0)
error ("mi_cmd_data_list_register_change: " error ("-data-list-changed-registers: "
"Unable to read register contents."); "Unable to read register contents.");
else if (changed) else if (changed)
ui_out_field_int (uiout, NULL, regnum); ui_out_field_int (uiout, NULL, regnum);
@ -1063,7 +1063,7 @@ mi_cmd_data_list_register_values (char *command, char **argv, int argc)
upon the particular processor being debugged. */ upon the particular processor being debugged. */
if (argc == 0) if (argc == 0)
error ("mi_cmd_data_list_register_values: Usage: " error ("-data-list-register-values: Usage: "
"-data-list-register-values <format> [<regnum1>...<regnumN>]"); "-data-list-register-values <format> [<regnum1>...<regnumN>]");
format = (int) argv[0][0]; format = (int) argv[0][0];
@ -1187,19 +1187,19 @@ mi_cmd_data_write_register_values (char *command, char **argv, int argc)
numregs = gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch); numregs = gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch);
if (argc == 0) if (argc == 0)
error ("mi_cmd_data_write_register_values: Usage: -data-write-register-" error ("-data-write-register-values: Usage: -data-write-register-"
"values <format> [<regnum1> <value1>...<regnumN> <valueN>]"); "values <format> [<regnum1> <value1>...<regnumN> <valueN>]");
format = (int) argv[0][0]; format = (int) argv[0][0];
if (!target_has_registers) if (!target_has_registers)
error ("mi_cmd_data_write_register_values: No registers."); error ("-data-write-register-values: No registers.");
if (!(argc - 1)) 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) if ((argc - 1) % 2)
error ("mi_cmd_data_write_register_values: " error ("-data-write-register-values: "
"Regs and vals are not in pairs."); "Regs and vals are not in pairs.");
for (i = 1; i < argc; i = i + 2) for (i = 1; i < argc; i = i + 2)
@ -1240,7 +1240,7 @@ mi_cmd_data_evaluate_expression (char *command, char **argv, int argc)
if (argc != 1) if (argc != 1)
{ {
ui_out_stream_delete (stb); ui_out_stream_delete (stb);
error ("mi_cmd_data_evaluate_expression: " error ("-data-evaluate-expression: "
"Usage: -data-evaluate-expression expression"); "Usage: -data-evaluate-expression expression");
} }
@ -1311,7 +1311,7 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
while (1) 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); &optind, &optarg);
if (opt < 0) if (opt < 0)
@ -1327,7 +1327,7 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
argc -= optind; argc -= optind;
if (argc < 5 || argc > 6) if (argc < 5 || argc > 6)
error ("mi_cmd_data_read_memory: Usage: " error ("-data-read-memory: Usage: "
"ADDR WORD-FORMAT WORD-SIZE NR-ROWS NR-COLS [ASCHAR]."); "ADDR WORD-FORMAT WORD-SIZE NR-ROWS NR-COLS [ASCHAR].");
/* Extract all the arguments. */ /* Extract all the arguments. */
@ -1364,12 +1364,12 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
/* The number of rows. */ /* The number of rows. */
nr_rows = atol (argv[3]); nr_rows = atol (argv[3]);
if (nr_rows <= 0) 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. */ /* Number of bytes per row. */
nr_cols = atol (argv[4]); nr_cols = atol (argv[4]);
if (nr_cols <= 0) 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. */ /* The un-printable character when printing ascii. */
if (argc == 6) if (argc == 6)
@ -1496,7 +1496,7 @@ mi_cmd_data_read_memory_bytes (char *command, char **argv, int argc)
while (1) 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); &optind, &optarg);
if (opt < 0) if (opt < 0)
break; break;
@ -1597,7 +1597,7 @@ mi_cmd_data_write_memory (char *command, char **argv, int argc)
while (1) 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); &optind, &optarg);
if (opt < 0) if (opt < 0)
@ -1613,7 +1613,7 @@ mi_cmd_data_write_memory (char *command, char **argv, int argc)
argc -= optind; argc -= optind;
if (argc != 4) if (argc != 4)
error ("mi_cmd_data_write_memory: Usage: " error ("-data-write-memory: Usage: "
"[-o COLUMN_OFFSET] ADDR FORMAT WORD-SIZE VALUE."); "[-o COLUMN_OFFSET] ADDR FORMAT WORD-SIZE VALUE.");
/* Extract all the arguments. */ /* Extract all the arguments. */
@ -1698,7 +1698,7 @@ mi_cmd_enable_timings (char *command, char **argv, int argc)
return; return;
usage_error: usage_error:
error ("mi_cmd_enable_timings: Usage: %s {yes|no}", command); error ("-enable-timings: Usage: %s {yes|no}", command);
} }
void void

View File

@ -39,13 +39,13 @@ mi_cmd_symbol_list_lines (char *command, char **argv, int argc)
struct cleanup *cleanup_stack, *cleanup_tuple; struct cleanup *cleanup_stack, *cleanup_tuple;
if (argc != 1) if (argc != 1)
error (_("mi_cmd_symbol_list_lines: Usage: SOURCE_FILENAME")); error (_("-symbol-list-lines: Usage: SOURCE_FILENAME"));
filename = argv[0]; filename = argv[0];
s = lookup_symtab (filename); s = lookup_symtab (filename);
if (s == NULL) 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 /* Now, dump the associated line table. The pc addresses are already
sorted by increasing values in the symbol table, so no need to sorted by increasing values in the symbol table, so no need to

View File

@ -1,3 +1,21 @@
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> 2011-01-12 Andrew Burgess <aburgess@broadcom.com>
Jan Kratochvil <jan.kratochvil@redhat.com> Jan Kratochvil <jan.kratochvil@redhat.com>

View File

@ -41,7 +41,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
proc register_tests_no_exec { } { proc register_tests_no_exec { } {
# Test the generic IDT chip. # Test the generic IDT chip.
mi_gdb_test "111-data-list-register-values" \ 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" "wrong arguments"
mi_gdb_test "111-data-list-register-values x" \ mi_gdb_test "111-data-list-register-values x" \

View File

@ -37,15 +37,15 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
} }
mi_gdb_test "-interpreter-exec" \ 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" "-interpreter-exec with no arguments"
mi_gdb_test "-interpreter-exec console" \ 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" "-interpreter-exec with one argument"
mi_gdb_test "-interpreter-exec bogus command" \ 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" "-interpreter-exec with bogus interpreter"
set msg {Undefined command: \\\"bogus\\\"\. Try \\\"help\\\"\.} set msg {Undefined command: \\\"bogus\\\"\. Try \\\"help\\\"\.}

View File

@ -210,7 +210,7 @@ proc test_disassembly_bogus_args {} {
# -data-disassembly -f basics.c -l 32 -- 9 # -data-disassembly -f basics.c -l 32 -- 9
mi_gdb_test "123-data-disassemble -f foo -l abc -n 0 -- 0" \ 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" "data-disassemble bogus filename"
mi_gdb_test "321-data-disassemble -s foo -e bar -- 0" \ mi_gdb_test "321-data-disassemble -s foo -e bar -- 0" \
@ -218,11 +218,11 @@ proc test_disassembly_bogus_args {} {
"data-disassemble bogus address" "data-disassemble bogus address"
mi_gdb_test "456-data-disassemble -s \$pc -f basics.c -- 0" \ 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" "data-disassemble mix different args"
mi_gdb_test "789-data-disassemble -f basics.c -l $line_main_body -- 9" \ 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" "data-disassemble wrong mode arg"
} }

View File

@ -41,7 +41,7 @@ proc check_mi_thread_command_set {} {
set thread_list [get_mi_thread_list "in check_mi_thread_command_set"] set thread_list [get_mi_thread_list "in check_mi_thread_command_set"]
mi_gdb_test "-thread-select" \ 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" "check_mi_thread_command_set: -thread-select"
mi_gdb_test "-thread-select 123456789" \ mi_gdb_test "-thread-select 123456789" \

View File

@ -42,7 +42,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
proc sparc_register_tests_no_exec { } { proc sparc_register_tests_no_exec { } {
# Test the generic IDT chip. # Test the generic IDT chip.
mi_gdb_test "111-data-list-register-values" \ 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" "wrong arguments"
mi_gdb_test "111-data-list-register-values x" \ mi_gdb_test "111-data-list-register-values x" \

View File

@ -69,7 +69,7 @@ proc test_stack_frame_listing {} {
"stack frame listing 1 3" "stack frame listing 1 3"
mi_gdb_test "234-stack-list-frames 1" \ 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" "stack frame listing wrong"
mi_gdb_test "235-stack-info-frame" \ mi_gdb_test "235-stack-info-frame" \
@ -120,7 +120,7 @@ proc test_stack_args_listing {} {
"stack args listing 1 1 3" "stack args listing 1 1 3"
mi_gdb_test "234-stack-list-arguments" \ 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" "stack args listing wrong"
mi_gdb_test "235-stack-list-arguments 1 1 300" \ mi_gdb_test "235-stack-list-arguments 1 1 300" \
@ -151,7 +151,7 @@ proc test_stack_info_depth {} {
"stack info-depth 99" "stack info-depth 99"
mi_gdb_test "231-stack-info-depth 99 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 info-depth wrong usage"
} }
@ -185,7 +185,7 @@ mi_execute_to "exec-next 4" "end-stepping-range" "callee4" "" ".*${srcfile}" $li
"stack locals listing, simple types: names and values, complex type: names and types" "stack locals listing, simple types: names and values, complex type: names and types"
mi_gdb_test "234-stack-list-locals" \ 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" "stack locals listing wrong"
mi_gdb_test "232-stack-select-frame 1" \ mi_gdb_test "232-stack-select-frame 1" \

View File

@ -47,7 +47,7 @@ mi_runto do_block_tests
mi_create_varobj "cb" "cb" "create local variable cb" mi_create_varobj "cb" "cb" "create local variable cb"
mi_gdb_test "-var-create foo * foo" \ 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" "try to create local variable foo"
# step to "foo = 123;" # step to "foo = 123;"

View File

@ -56,14 +56,14 @@ mi_create_varobj "global_simple" "global_simple" "create global variable"
# Desc: Create non-existent variable # Desc: Create non-existent variable
mi_gdb_test "112-var-create bogus_unknown_variable * bogus_unknown_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" "create non-existent variable"
# Test: c_variable-1.3 # Test: c_variable-1.3
# Desc: Create out of scope variable # Desc: Create out of scope variable
mi_gdb_test "113-var-create argc * argc" \ 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" "create out of scope variable"
mi_runto do_locals_tests mi_runto do_locals_tests
@ -123,7 +123,7 @@ mi_create_varobj_checked lsimple.integer lsimple.integer "int" \
# Type names (like int, long, etc..) are all proper expressions to gdb. # Type names (like int, long, etc..) are all proper expressions to gdb.
# make sure variable code does not allow users to create variables, though. # make sure variable code does not allow users to create variables, though.
mi_gdb_test "-var-create int * int" \ 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" "create int"
@ -244,7 +244,7 @@ mi_gdb_test "-var-update *" \
# #
### ###
mi_gdb_test "-var-assign global_simple 0" \ 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" "assign to global_simple"
mi_gdb_test "-var-assign linteger 3333" \ mi_gdb_test "-var-assign linteger 3333" \
@ -414,7 +414,7 @@ mi_create_varobj_checked l l {long int \*} "create l"
# Test: c_variable-2.11 # Test: c_variable-2.11
# Desc: create do_locals_tests local in subroutine1 # Desc: create do_locals_tests local in subroutine1
mi_gdb_test "-var-create linteger * linteger" \ 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" "create linteger"
mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \ mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \

View File

@ -37,15 +37,15 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
} }
mi_gdb_test "-interpreter-exec" \ 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" "-interpreter-exec with no arguments"
mi_gdb_test "-interpreter-exec console" \ 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" "-interpreter-exec with one argument"
mi_gdb_test "-interpreter-exec bogus command" \ 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" "-interpreter-exec with bogus interpreter"
set msg {Undefined command: \\\"bogus\\\"\. Try \\\"help\\\"\.} set msg {Undefined command: \\\"bogus\\\"\. Try \\\"help\\\"\.}

View File

@ -210,7 +210,7 @@ proc test_disassembly_bogus_args {} {
# -data-disassembly -f basics.c -l 32 -- 9 # -data-disassembly -f basics.c -l 32 -- 9
mi_gdb_test "123-data-disassemble -f foo -l abc -n 0 -- 0" \ 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" "data-disassemble bogus filename"
mi_gdb_test "321-data-disassemble -s foo -e bar -- 0" \ mi_gdb_test "321-data-disassemble -s foo -e bar -- 0" \
@ -218,11 +218,11 @@ proc test_disassembly_bogus_args {} {
"data-disassemble bogus address" "data-disassemble bogus address"
mi_gdb_test "456-data-disassemble -s \$pc -f basics.c -- 0" \ 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" "data-disassemble mix different args"
mi_gdb_test "789-data-disassemble -f basics.c -l $line_main_body -- 9" \ 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" "data-disassemble wrong mode arg"
} }

View File

@ -41,7 +41,7 @@ proc check_mi_thread_command_set {} {
set thread_list [get_mi_thread_list "in check_mi_thread_command_set"] set thread_list [get_mi_thread_list "in check_mi_thread_command_set"]
mi_gdb_test "-thread-select" \ 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" "check_mi_thread_command_set: -thread-select"
mi_gdb_test "-thread-select 123456789" \ mi_gdb_test "-thread-select 123456789" \

View File

@ -42,7 +42,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
proc sparc_register_tests_no_exec { } { proc sparc_register_tests_no_exec { } {
# Test the generic IDT chip. # Test the generic IDT chip.
mi_gdb_test "111-data-list-register-values" \ 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" "wrong arguments"
mi_gdb_test "111-data-list-register-values x" \ mi_gdb_test "111-data-list-register-values x" \

View File

@ -69,7 +69,7 @@ proc test_stack_frame_listing {} {
"stack frame listing 1 3" "stack frame listing 1 3"
mi_gdb_test "234-stack-list-frames 1" \ 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" "stack frame listing wrong"
mi_gdb_test "235-stack-info-frame" \ mi_gdb_test "235-stack-info-frame" \
@ -120,7 +120,7 @@ proc test_stack_args_listing {} {
"stack args listing 1 1 3" "stack args listing 1 1 3"
mi_gdb_test "234-stack-list-arguments" \ 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" "stack args listing wrong"
mi_gdb_test "235-stack-list-arguments 1 1 300" \ mi_gdb_test "235-stack-list-arguments 1 1 300" \
@ -151,7 +151,7 @@ proc test_stack_info_depth {} {
"stack info-depth 99" "stack info-depth 99"
mi_gdb_test "231-stack-info-depth 99 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 info-depth wrong usage"
} }
@ -185,7 +185,7 @@ mi_execute_to "exec-next 4" "end-stepping-range" "callee4" "" ".*${srcfile}" $li
"stack locals listing, simple types: names and values, complex type: names and types" "stack locals listing, simple types: names and values, complex type: names and types"
mi_gdb_test "234-stack-list-locals" \ 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" "stack locals listing wrong"
mi_gdb_test "232-stack-select-frame 1" \ mi_gdb_test "232-stack-select-frame 1" \

View File

@ -47,7 +47,7 @@ mi_runto do_block_tests
mi_create_varobj "cb" "cb" "create local variable cb" mi_create_varobj "cb" "cb" "create local variable cb"
mi_gdb_test "-var-create foo * foo" \ 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" "create local variable foo"
# step to "foo = 123;" # step to "foo = 123;"

View File

@ -56,14 +56,14 @@ mi_create_varobj "global_simple" "global_simple" "create global variable"
# Desc: Create non-existent variable # Desc: Create non-existent variable
mi_gdb_test "112-var-create bogus_unknown_variable * bogus_unknown_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" "create non-existent variable"
# Test: c_variable-1.3 # Test: c_variable-1.3
# Desc: Create out of scope variable # Desc: Create out of scope variable
mi_gdb_test "113-var-create argc * argc" \ 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" "create out of scope variable"
mi_runto do_locals_tests mi_runto do_locals_tests
@ -123,7 +123,7 @@ mi_create_varobj_checked lsimple.integer lsimple.integer "int" \
# Type names (like int, long, etc..) are all proper expressions to gdb. # Type names (like int, long, etc..) are all proper expressions to gdb.
# make sure variable code does not allow users to create variables, though. # make sure variable code does not allow users to create variables, though.
mi_gdb_test "-var-create int * int" \ 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" "create int"
@ -244,7 +244,7 @@ mi_gdb_test "-var-update *" \
# #
### ###
mi_gdb_test "-var-assign global_simple 0" \ 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" "assign to global_simple"
mi_gdb_test "-var-assign linteger 3333" \ mi_gdb_test "-var-assign linteger 3333" \
@ -377,7 +377,7 @@ mi_create_varobj_checked l l {long int \*} "create l"
# Test: c_variable-2.11 # Test: c_variable-2.11
# Desc: create do_locals_tests local in subroutine1 # Desc: create do_locals_tests local in subroutine1
mi_gdb_test "-var-create linteger * linteger" \ 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" "create linteger"
mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \ mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \