Search global symbols from the expression's block objfile first.
authorJoel Brobecker <brobecker@gnat.com>
Thu, 10 May 2012 16:24:40 +0000 (16:24 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Thu, 10 May 2012 16:24:40 +0000 (16:24 +0000)
commit99a547d6792f51503719e01937129b94597c5a67
treeeaf163b5d17c124f62efb4a227734dd7b7854c83
parent0ece64fd6fb4dcbb1cbe579fed01dcac2c19f888
Search global symbols from the expression's block objfile first.

gdb/ChangeLog:

        * findvar.c (default_read_var_value): For LOC_UNRESOLVED symbols,
        try locating the symbol in the symbol's own objfile first, before
        extending the search to all objfiles.
        * symtab.c (lookup_symbol_aux_objfile): New function, extracted
        out of lookup_symbol_aux_symtabs.
        (lookup_symbol_aux_symtabs): Add new parameter "exclude_objfile".
        Replace extracted-out code by call to lookup_symbol_aux_objfile.
        Do not search EXCLUDE_OBJFILE.
        (lookup_static_symbol_aux): Update call to lookup_symbol_aux_symtabs.
        (lookup_symbol_global): Search for matches in the block's objfile
        first, before searching all other objfiles.
gdb/ChangeLog
gdb/findvar.c
gdb/symtab.c