* 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>
* 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)
{
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;
@ -137,9 +137,9 @@ mi_cmd_break_insert (char *command, char **argv, int argc)
}
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! */
@ -235,7 +235,7 @@ mi_cmd_break_watch (char *command, char **argv, int argc)
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)
@ -251,9 +251,9 @@ mi_cmd_break_watch (char *command, char **argv, int argc)
}
}
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! */
@ -269,7 +269,7 @@ mi_cmd_break_watch (char *command, char **argv, int argc)
awatch_command_wrapper (expr, FROM_TTY, 0);
break;
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. */
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;
@ -131,16 +131,16 @@ 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 "
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 */
@ -157,11 +157,11 @@ mi_cmd_disassemble (char *command, char **argv, int argc)
{
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"));
}

View File

@ -70,7 +70,7 @@ void
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)
{
@ -81,7 +81,7 @@ mi_cmd_env_pwd (char *command, char **argv, int argc)
/* 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);
@ -92,7 +92,7 @@ void
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]);
}
@ -140,7 +140,7 @@ mi_cmd_env_path (char *command, char **argv, int argc)
/* 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)
@ -211,7 +211,7 @@ mi_cmd_env_dir (char *command, char **argv, int argc)
/* 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)
@ -253,8 +253,8 @@ mi_cmd_inferior_tty_show (char *command, char **argv, int argc)
{
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);

View File

@ -35,8 +35,8 @@ mi_cmd_file_list_exec_source_file (char *command, char **argv, int argc)
{
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 ();
@ -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.
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);
@ -83,8 +83,8 @@ mi_cmd_file_list_exec_source_files (char *command, char **argv, int argc)
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");

View File

@ -53,7 +53,7 @@ mi_cmd_stack_list_frames (char *command, char **argv, int argc)
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)
{
@ -76,7 +76,7 @@ mi_cmd_stack_list_frames (char *command, char **argv, int argc)
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");
@ -103,7 +103,7 @@ mi_cmd_stack_info_depth (char *command, char **argv, int argc)
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]);
@ -147,7 +147,7 @@ mi_cmd_stack_list_locals (char *command, char **argv, int argc)
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);
@ -168,7 +168,7 @@ 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: "
error (_("-stack-list-arguments: Usage: "
"PRINT_VALUES [FRAME_LOW FRAME_HIGH]"));
if (argc == 3)
@ -194,7 +194,7 @@ mi_cmd_stack_list_args (char *command, char **argv, int argc)
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");
@ -399,7 +399,7 @@ void
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 */ );
}
@ -408,7 +408,7 @@ void
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);
}

View File

@ -33,11 +33,11 @@ mi_cmd_target_file_get (char *command, char **argv, int argc)
{
{ 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];
@ -57,11 +57,11 @@ mi_cmd_target_file_put (char *command, char **argv, int argc)
{
{ 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];
@ -81,11 +81,11 @@ mi_cmd_target_file_delete (char *command, char **argv, int argc)
{
{ 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];

View File

@ -108,9 +108,9 @@ mi_cmd_var_create (char *command, char **argv, int argc)
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]);
@ -130,7 +130,7 @@ mi_cmd_var_create (char *command, char **argv, int argc)
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;
@ -150,7 +150,7 @@ mi_cmd_var_create (char *command, char **argv, int argc)
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 */);
@ -169,7 +169,7 @@ mi_cmd_var_delete (char *command, char **argv, int argc)
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
@ -181,10 +181,10 @@ 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 "
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
@ -192,7 +192,7 @@ mi_cmd_var_delete (char *command, char **argv, int argc)
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]);
@ -246,7 +246,7 @@ mi_cmd_var_set_format (char *command, char **argv, int argc)
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]);
@ -314,7 +314,7 @@ mi_cmd_var_show_format (char *command, char **argv, int argc)
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]);
@ -331,7 +331,7 @@ mi_cmd_var_info_num_children (char *command, char **argv, int argc)
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]);
@ -403,7 +403,7 @@ 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: "
error (_("-var-list-children: Usage: "
"[PRINT_VALUES] NAME [FROM TO]"));
/* 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;
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]);
@ -501,7 +501,7 @@ mi_cmd_var_info_expression (char *command, char **argv, int argc)
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]);
@ -520,7 +520,7 @@ mi_cmd_var_show_attributes (char *command, char **argv, int argc)
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]);
@ -610,18 +610,18 @@ mi_cmd_var_assign (char *command, char **argv, int argc)
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);
@ -672,7 +672,7 @@ mi_cmd_var_update (char *command, char **argv, int argc)
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];
@ -819,7 +819,7 @@ void
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 ();
}
@ -830,7 +830,7 @@ mi_cmd_var_set_update_range (char *command, char **argv, int argc)
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]);

View File

@ -192,16 +192,16 @@ mi_cmd_interpreter_exec (char *command, char **argv, int argc)
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]);

View File

@ -471,7 +471,7 @@ mi_cmd_thread_select (char *command, char **argv, int argc)
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);
@ -489,7 +489,7 @@ mi_cmd_thread_list_ids (char *command, char **argv, int argc)
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);
@ -984,7 +984,7 @@ 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: "
error ("-data-list-changed-registers: "
"Unable to read register contents.");
else if (changed)
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);
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);
@ -1063,7 +1063,7 @@ 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: "
error ("-data-list-register-values: Usage: "
"-data-list-register-values <format> [<regnum1>...<regnumN>]");
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);
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)
@ -1240,7 +1240,7 @@ 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: "
error ("-data-evaluate-expression: "
"Usage: -data-evaluate-expression expression");
}
@ -1311,7 +1311,7 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
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)
@ -1327,7 +1327,7 @@ 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: "
error ("-data-read-memory: Usage: "
"ADDR WORD-FORMAT WORD-SIZE NR-ROWS NR-COLS [ASCHAR].");
/* Extract all the arguments. */
@ -1364,12 +1364,12 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
/* 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)
@ -1496,7 +1496,7 @@ mi_cmd_data_read_memory_bytes (char *command, char **argv, int argc)
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;
@ -1597,7 +1597,7 @@ mi_cmd_data_write_memory (char *command, char **argv, int argc)
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)
@ -1613,7 +1613,7 @@ mi_cmd_data_write_memory (char *command, char **argv, int argc)
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. */
@ -1698,7 +1698,7 @@ mi_cmd_enable_timings (char *command, char **argv, int argc)
return;
usage_error:
error ("mi_cmd_enable_timings: Usage: %s {yes|no}", command);
error ("-enable-timings: Usage: %s {yes|no}", command);
}
void

View File

@ -39,13 +39,13 @@ mi_cmd_symbol_list_lines (char *command, char **argv, int argc)
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

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>
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 { } {
# 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" \

View File

@ -37,15 +37,15 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
}
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\\\"\.}

View File

@ -210,7 +210,7 @@ proc test_disassembly_bogus_args {} {
# -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" \
@ -218,11 +218,11 @@ proc test_disassembly_bogus_args {} {
"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"
}

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"]
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" \

View File

@ -42,7 +42,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
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" \

View File

@ -69,7 +69,7 @@ proc test_stack_frame_listing {} {
"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" \
@ -120,7 +120,7 @@ proc test_stack_args_listing {} {
"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" \
@ -151,7 +151,7 @@ proc test_stack_info_depth {} {
"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"
}
@ -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"
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" \

View File

@ -47,7 +47,7 @@ mi_runto do_block_tests
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;"

View File

@ -56,14 +56,14 @@ mi_create_varobj "global_simple" "global_simple" "create global variable"
# 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
@ -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.
# 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"
@ -244,7 +244,7 @@ mi_gdb_test "-var-update *" \
#
###
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" \
@ -414,7 +414,7 @@ mi_create_varobj_checked l l {long int \*} "create l"
# 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=\".*\"\}" \

View File

@ -37,15 +37,15 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
}
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\\\"\.}

View File

@ -210,7 +210,7 @@ proc test_disassembly_bogus_args {} {
# -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" \
@ -218,11 +218,11 @@ proc test_disassembly_bogus_args {} {
"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"
}

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"]
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" \

View File

@ -42,7 +42,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
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" \

View File

@ -69,7 +69,7 @@ proc test_stack_frame_listing {} {
"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" \
@ -120,7 +120,7 @@ proc test_stack_args_listing {} {
"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" \
@ -151,7 +151,7 @@ proc test_stack_info_depth {} {
"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"
}
@ -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"
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" \

View File

@ -47,7 +47,7 @@ mi_runto do_block_tests
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;"

View File

@ -56,14 +56,14 @@ mi_create_varobj "global_simple" "global_simple" "create global variable"
# 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
@ -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.
# 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"
@ -244,7 +244,7 @@ mi_gdb_test "-var-update *" \
#
###
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" \
@ -377,7 +377,7 @@ mi_create_varobj_checked l l {long int \*} "create l"
# 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=\".*\"\}" \