aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2002-11-08 20:05:10 +0000
committerJim Blandy <jimb@codesourcery.com>2002-11-08 20:05:10 +0000
commit921e78cf01505c9a7039149a1646c50f8d010539 (patch)
treee410d3fb07d4747665be6f935911d5e5acdab90b /gdb/dwarf2read.c
parent9c1412c1a1a5e1fe7ffadb8a2e4cefe8bf7c4e9f (diff)
downloadgdb-921e78cf01505c9a7039149a1646c50f8d010539.zip
gdb-921e78cf01505c9a7039149a1646c50f8d010539.tar.gz
gdb-921e78cf01505c9a7039149a1646c50f8d010539.tar.bz2
* dwarf2read.c (read_func_scope): Restore list_in_scope properly
when we finish a function a context. * buildsym.h (outermost_context_p): New macro. (Bug analyzed by David Edelsohn.)
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 7e017c6..13ddaea 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -2021,7 +2021,10 @@ read_func_scope (struct die_info *die, struct objfile *objfile,
local_symbols = new->locals;
param_symbols = new->params;
- list_in_scope = &file_symbols;
+ /* If we've finished processing a top-level function, subsequent
+ symbols go in the file symbol list. */
+ if (outermost_context_p ())
+ list_in_scope = &file_symbols;
}
/* Process all the DIES contained within a lexical block scope. Start