diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-05-24 22:14:36 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-05-24 22:14:36 +0000 |
commit | bfb05775e68c415e976761e14608485facfaefcf (patch) | |
tree | 767d8f95befa3b7f5bc09a92952e0da88bf97f3c /gdb/psymtab.c | |
parent | 685b110556624dff5bd9614edb016bad9b0642fc (diff) | |
download | gdb-bfb05775e68c415e976761e14608485facfaefcf.zip gdb-bfb05775e68c415e976761e14608485facfaefcf.tar.gz gdb-bfb05775e68c415e976761e14608485facfaefcf.tar.bz2 |
gdb/
* psymtab.c (lookup_symbol_aux_psymtabs): New variable stab_best. Use
it as a fallback for TYPE_IS_OPAQUE.
* symfile.h (struct quick_symbol_functions): Mention TYPE_OPAQUE
symbols for lookup_symbol.
gdb/testsuite/
* gdb.dwarf2/dw2-icc-opaque.S: Add debug_info_seg3 and
.debug_abbrev_seg3.
Diffstat (limited to 'gdb/psymtab.c')
-rw-r--r-- | gdb/psymtab.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/psymtab.c b/gdb/psymtab.c index e463fff..647368c 100644 --- a/gdb/psymtab.c +++ b/gdb/psymtab.c @@ -510,6 +510,7 @@ lookup_symbol_aux_psymtabs (struct objfile *objfile, { struct partial_symtab *ps; const int psymtab_index = (block_index == GLOBAL_BLOCK ? 1 : 0); + struct symtab *stab_best = NULL; ALL_OBJFILE_PSYMTABS_REQUIRED (objfile, ps) { @@ -530,13 +531,18 @@ lookup_symbol_aux_psymtabs (struct objfile *objfile, } if (sym && strcmp_iw (SYMBOL_SEARCH_NAME (sym), name) == 0) - return stab; + { + if (!TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) + return stab; + + stab_best = stab; + } /* Keep looking through other psymtabs. */ } } - return NULL; + return stab_best; } /* Look in PST for a symbol in DOMAIN whose name matches NAME. Search |