This is the mail archive of the
mailing list for the GDB project.
[binutils-gdb] Have parser reset the innermost block tracker
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Sat, 23 Mar 2019 13:30:13 -0400
- Subject: [binutils-gdb] Have parser reset the innermost block tracker
*** TEST RESULTS FOR COMMIT 7ad417dd217849c164e3c8a250c62a98eb0b8cd4 ***
Author: Tom Tromey <firstname.lastname@example.org>
Have parser reset the innermost block tracker
I ran across a comment in symfile.c today:
/* Clear globals which might have pointed into a removed objfile.
FIXME: It's not clear which of these are supposed to persist
between expressions and which ought to be reset each time. */
It seems to me that this can be clarified: the parser entry points
ought to reset the innermost block tracker (and the expression context
block), and these should not be considered valid for code to use at
arbitrary times -- only immediately after an expression has been
This patch implements this idea. This could be further improved by
removing the parser globals and changing the parser functions to
return this information, but I have not done this.
Tested by the buildbot.
2019-03-23 Tom Tromey <email@example.com>
* varobj.c (varobj_create): Update.
* symfile.c (clear_symtab_users): Don't reset innermost_block.
* printcmd.c (display_command, do_one_display): Don't reset
* parser-defs.h (enum innermost_block_tracker_type): Move to
(innermost_block): Update comment.
* parse.c (parse_exp_1): Add tracker_types parameter.
(parse_exp_in_context): Rename from parse_exp_in_context_1. Add
tracker_types parameter. Reset innermost_block.
* objfiles.c (~objfile): Don't reset expression_context_block or
* expression.h (enum innermost_block_tracker_type): Move from
(parse_exp_1): Add tracker_types parameter.
* breakpoint.c (set_breakpoint_condition, watch_command_1): Don't