diff options
author | Daniel Jacobowitz <drow@false.org> | 2005-07-15 04:12:19 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2005-07-15 04:12:19 +0000 |
commit | 1ecb4ee0309ec7962314a8f98d45ac91be48aebf (patch) | |
tree | a653dbd8674e8acc1979271d013ec8a8023af084 /gdb/mi/mi-cmd-stack.c | |
parent | fb6ae37f9e6776de6a048387949575b08a52ab1f (diff) | |
download | gdb-1ecb4ee0309ec7962314a8f98d45ac91be48aebf.zip gdb-1ecb4ee0309ec7962314a8f98d45ac91be48aebf.tar.gz gdb-1ecb4ee0309ec7962314a8f98d45ac91be48aebf.tar.bz2 |
2005-07-15 Nick Roberts <nickrob@snap.net.nz>
Daniel Jacobowitz <dan@codesourcery.com>
* mi/mi-cmds.h (mi_no_values, mi_simple_values, mi_all_values): New
declarations.
* mi/mi-cmd-stack.c (mi_cmd_stack_list_locals): Use string
constants instead of literals for MI command options.
* mi/mi-cmd-var.c (mi_no_values, mi_simple_values, mi_all_values):
New variables.
(mi_parse_values_option, mi_print_value_p): New functions.
(mi_cmd_var_list_children): Use mi_parse_values_option and
mi_print_value_p.
(mi_cmd_var_update): Support a PRINT_VALUES option. Update calls
to varobj_update_one.
(varobj_update_one): Take a print_values argument. Call
mi_print_value_p.
* varobj.c (varobj_get_gdb_type): New function.
* varobj.h (varobj_get_gdb_type): New prototype.
Diffstat (limited to 'gdb/mi/mi-cmd-stack.c')
-rw-r--r-- | gdb/mi/mi-cmd-stack.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c index 7b311a3..a7a5a17 100644 --- a/gdb/mi/mi-cmd-stack.c +++ b/gdb/mi/mi-cmd-stack.c @@ -1,5 +1,5 @@ /* MI Command Set - stack commands. - Copyright 2000, 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Contributed by Cygnus Solutions (a Red Hat company). This file is part of GDB. @@ -136,16 +136,18 @@ mi_cmd_stack_list_locals (char *command, char **argv, int argc) frame = get_selected_frame (NULL); if (strcmp (argv[0], "0") == 0 - || strcmp (argv[0], "--no-values") == 0) + || strcmp (argv[0], mi_no_values) == 0) print_values = PRINT_NO_VALUES; else if (strcmp (argv[0], "1") == 0 - || strcmp (argv[0], "--all-values") == 0) + || strcmp (argv[0], mi_all_values) == 0) print_values = PRINT_ALL_VALUES; else if (strcmp (argv[0], "2") == 0 - || strcmp (argv[0], "--simple-values") == 0) + || strcmp (argv[0], mi_simple_values) == 0) print_values = PRINT_SIMPLE_VALUES; else - error (_("Unknown value for PRINT_VALUES: must be: 0 or \"--no-values\", 1 or \"--all-values\", 2 or \"--simple-values\"")); + error (_("Unknown value for PRINT_VALUES: must be: \ +0 or \"%s\", 1 or \"%s\", 2 or \"%s\""), + mi_no_values, mi_all_values, mi_simple_values); list_args_or_locals (1, print_values, frame); return MI_CMD_DONE; } |