diff options
author | Daniel Jacobowitz <drow@false.org> | 2009-12-28 21:29:53 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2009-12-28 21:29:53 +0000 |
commit | 0fe7935b333f7332ffd501dc45ff73ceec09b45f (patch) | |
tree | 5dabd7adb87f056b00889e1c60906baa53e650be /gdb/dwarf2read.c | |
parent | 22e722e1995bffc3b891dbcac05b8c274f14194e (diff) | |
download | gdb-0fe7935b333f7332ffd501dc45ff73ceec09b45f.zip gdb-0fe7935b333f7332ffd501dc45ff73ceec09b45f.tar.gz gdb-0fe7935b333f7332ffd501dc45ff73ceec09b45f.tar.bz2 |
* NEWS: Document "info variables" change.
* dwarf2read.c (new_symbol): Add file-scope external unresolved
symbols to global_symbols.
* symtab.c (search_symbols): Skip LOC_UNRESOLVED symbols.
doc/
* gdb.texinfo (Symbols): "info variables" prints definitions, not
declarations.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index ffeaaf2..2205ef7 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -8463,8 +8463,15 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu) if (attr2 && (DW_UNSND (attr2) != 0) && dwarf2_attr (die, DW_AT_type, cu) != NULL) { + struct pending **list_to_add; + + /* A variable with DW_AT_external is never static, but it + may be block-scoped. */ + list_to_add = (cu->list_in_scope == &file_symbols + ? &global_symbols : cu->list_in_scope); + SYMBOL_CLASS (sym) = LOC_UNRESOLVED; - add_symbol_to_list (sym, cu->list_in_scope); + add_symbol_to_list (sym, list_to_add); } else if (!die_is_declaration (die, cu)) { |