diff options
author | Doug Evans <dje@google.com> | 2012-09-11 22:42:22 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2012-09-11 22:42:22 +0000 |
commit | 83a788b8b1c6398d0504c99bc3da0de8aca0039c (patch) | |
tree | 4a6d5a82ed36a3d52ce4860effde0aa5a3b673fd /gdb | |
parent | 3a0ed5d7793f9f38c56423531ab0a32f559bb5b2 (diff) | |
download | gdb-83a788b8b1c6398d0504c99bc3da0de8aca0039c.zip gdb-83a788b8b1c6398d0504c99bc3da0de8aca0039c.tar.gz gdb-83a788b8b1c6398d0504c99bc3da0de8aca0039c.tar.bz2 |
* dwarf2read.c (dw2_do_expand_symtabs_matching): Don't examine
.gdb_index symbol attributes if there are none.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 18 |
2 files changed, 17 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 333eb6e..037ff29 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2012-09-11 Doug Evans <dje@google.com> + + * dwarf2read.c (dw2_do_expand_symtabs_matching): Don't examine + .gdb_index symbol attributes if there are none. + 2012-09-11 Joel Brobecker <brobecker@adacore.com> * symtab.h (struct minimal_symbol) [has_size]: New field. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index ba5427c..5541b69 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -3133,15 +3133,21 @@ dw2_do_expand_symtabs_matching (struct objfile *objfile, int is_static = GDB_INDEX_SYMBOL_STATIC_VALUE (cu_index_and_attrs); gdb_index_symbol_kind symbol_kind = GDB_INDEX_SYMBOL_KIND_VALUE (cu_index_and_attrs); - - if (want_specific_block - && index->version >= 7 + /* Only check the symbol attributes if they're present. + Indices prior to version 7 don't record them, + and indices >= 7 may elide them for certain symbols + (gold does this). */ + int attrs_valid = + (index->version >= 7 + && symbol_kind != GDB_INDEX_SYMBOL_KIND_NONE); + + if (attrs_valid + && want_specific_block && want_static != is_static) continue; - /* Only check the symbol's kind if it has one. - Indices prior to version 7 don't record it. */ - if (index->version >= 7) + /* Only check the symbol's kind if it has one. */ + if (attrs_valid) { switch (domain) { |