diff options
author | Doug Evans <dje@google.com> | 2012-08-13 14:31:00 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2012-08-13 14:31:00 +0000 |
commit | f47f77df4e0f38c96bf5a4c4d8ecda6c73f5ffc2 (patch) | |
tree | fb8ad5a2bc53fa09dd56d57e3ceb72c730c620f3 /gdb/value.c | |
parent | 35d0a16941aa203778a48d840e283591549ea98b (diff) | |
download | gdb-f47f77df4e0f38c96bf5a4c4d8ecda6c73f5ffc2.zip gdb-f47f77df4e0f38c96bf5a4c4d8ecda6c73f5ffc2.tar.gz gdb-f47f77df4e0f38c96bf5a4c4d8ecda6c73f5ffc2.tar.bz2 |
* value.c (show_convenience): Tweak comment.
(_initialize_values): Mention convenience functions in the help text
for "show convenience".
doc/
* gdb.texinfo (Convenience Vars): Update text for "show convenience"
to include functions.
testsuite/
* gdb.base/default.exp: Update expected output of "show convenience".
Diffstat (limited to 'gdb/value.c')
-rw-r--r-- | gdb/value.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/gdb/value.c b/gdb/value.c index a6bb718..ae44eba 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -2255,11 +2255,17 @@ show_convenience (char *ignore, int from_tty) printf_filtered (("\n")); } if (!varseen) - printf_unfiltered (_("No debugger convenience variables now defined.\n" - "Convenience variables have " - "names starting with \"$\";\n" - "use \"set\" as in \"set " - "$foo = 5\" to define them.\n")); + { + /* This text does not mention convenience functions on purpose. + The user can't create them except via Python, and if Python support + is installed this message will never be printed ($_streq will + exist). */ + printf_unfiltered (_("No debugger convenience variables now defined.\n" + "Convenience variables have " + "names starting with \"$\";\n" + "use \"set\" as in \"set " + "$foo = 5\" to define them.\n")); + } } /* Extract a value as a C number (either long or double). @@ -3363,14 +3369,18 @@ void _initialize_values (void) { add_cmd ("convenience", no_class, show_convenience, _("\ -Debugger convenience (\"$foo\") variables.\n\ -These variables are created when you assign them values;\n\ -thus, \"print $foo=1\" gives \"$foo\" the value 1. Values may be any type.\n\ +Debugger convenience (\"$foo\") variables and functions.\n\ +Convenience variables are created when you assign them values;\n\ +thus, \"set $foo=1\" gives \"$foo\" the value 1. Values may be any type.\n\ \n\ A few convenience variables are given values automatically:\n\ \"$_\"holds the last address examined with \"x\" or \"info lines\",\n\ -\"$__\" holds the contents of the last address examined with \"x\"."), - &showlist); +\"$__\" holds the contents of the last address examined with \"x\"." +#ifdef HAVE_PYTHON +"\n\n\ +Convenience functions are defined via the Python API." +#endif + ), &showlist); add_cmd ("values", no_set_class, show_values, _("\ Elements of value history around item number IDX (or last ten)."), |