Search global block from basic_lookup_symbol_nonlocal
authorAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 31 Jul 2019 19:05:37 +0000 (13:05 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 2 Oct 2019 15:53:17 +0000 (09:53 -0600)
commitd3d323915c034ed9f7465568e1876aa269ab1d0f
tree1bf6138447b040297b3289490ca9025e19b64894
parent38583298e0ab81ab78689d89abcb5122e0251c74
Search global block from basic_lookup_symbol_nonlocal

This changes lookup_global_symbol to look in the global block
of the passed-in block.  If no block was passed in, it reverts to the
previous behavior.

This change is needed to ensure that 'FILENAME'::NAME lookups work
properly.  As debugging Pedro's test case showed, this was not working
properly in the case where multiple identical names could be found
(the one situation where this feature is truly needed :-).

This also removes some old comments from basic_lookup_symbol_nonlocal
that no longer apply.

Note that the new test cases for this change will appear in a later
patch.  They are in gdb.base/print-file-var.exp.

gdb/ChangeLog
2019-10-02  Andrew Burgess  <andrew.burgess@embecosm.com>

* symtab.c (lookup_global_symbol): Search global block.
gdb/ChangeLog
gdb/symtab.c
This page took 0.026232 seconds and 4 git commands to generate.