diff options
author | Tom Tromey <tromey@redhat.com> | 2010-02-10 18:57:21 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-02-10 18:57:21 +0000 |
commit | 92981e24467c4247c8bf16780cac90b340c0a4c2 (patch) | |
tree | 2d06fe7a6dc3736da642110496f8417d85b4a28c /gdb/parse.c | |
parent | 9fd3625f79a17480dd4017136edf4f9a21e834df (diff) | |
download | gdb-92981e24467c4247c8bf16780cac90b340c0a4c2.zip gdb-92981e24467c4247c8bf16780cac90b340c0a4c2.tar.gz gdb-92981e24467c4247c8bf16780cac90b340c0a4c2.tar.bz2 |
gdb
* parser-defs.h (parser_debug): Declare.
* parse.c (_initialize_parse): Install "debug parser" set/show
command.
(parser_debug): New global.
(show_parserdebug): New function.
* c-exp.y (c_parse): Set yydebug.
gdb/testsuite
* gdb.texinfo (Debugging Output): Document set debug parser and
show debug parser.
Diffstat (limited to 'gdb/parse.c')
-rw-r--r-- | gdb/parse.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/parse.c b/gdb/parse.c index d5a199b..aabc461 100644 --- a/gdb/parse.c +++ b/gdb/parse.c @@ -109,6 +109,18 @@ show_expressiondebug (struct ui_file *file, int from_tty, fprintf_filtered (file, _("Expression debugging is %s.\n"), value); } + +/* Non-zero if an expression parser should set yydebug. */ +int parser_debug; + +static void +show_parserdebug (struct ui_file *file, int from_tty, + struct cmd_list_element *c, const char *value) +{ + fprintf_filtered (file, _("Parser debugging is %s.\n"), value); +} + + static void free_funcalls (void *ignore); static int prefixify_expression (struct expression *); @@ -1377,4 +1389,12 @@ When non-zero, the internal representation of expressions will be printed."), NULL, show_expressiondebug, &setdebuglist, &showdebuglist); + add_setshow_boolean_cmd ("parser", class_maintenance, + &parser_debug, _("\ +Set parser debugging."), _("\ +Show parser debugging."), _("\ +When non-zero, expression parser tracing will be enabled."), + NULL, + show_parserdebug, + &setdebuglist, &showdebuglist); } |