diff options
author | Jim Blandy <jimb@codesourcery.com> | 2002-11-08 19:33:37 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2002-11-08 19:33:37 +0000 |
commit | 208d818701644f3d9582d264412485793e627492 (patch) | |
tree | 096a1cdc9811c0073566f26a981712a6dde5666e | |
parent | 413dad4d0e146d92406ab65b299172840ece4295 (diff) | |
download | gdb-208d818701644f3d9582d264412485793e627492.zip gdb-208d818701644f3d9582d264412485793e627492.tar.gz gdb-208d818701644f3d9582d264412485793e627492.tar.bz2 |
* dwarf2read.c (read_func_scope): Restore local_symbols and
param_symbols after we finish the function context. (Based on a
patch from David Edelsohn.)
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4470392..166ac5b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2002-11-08 Jim Blandy <jimb@redhat.com> + + * dwarf2read.c (read_func_scope): Restore local_symbols and + param_symbols after we finish the function context. (Based on a + patch from David Edelsohn.) + 2002-11-08 David Carlton <carlton@math.stanford.edu> * linespec.c (symbol_found): New function. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 7ede81b..7e017c6 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -2013,6 +2013,14 @@ read_func_scope (struct die_info *die, struct objfile *objfile, /* Make a block for the local symbols within. */ finish_block (new->name, &local_symbols, new->old_blocks, lowpc, highpc, objfile); + + /* In C++, we can have functions nested inside functions (e.g., when + a function declares a class that has methods). This means that + when we finish processing a function scope, we may need to go + back to building a containing block's symbol lists. */ + local_symbols = new->locals; + param_symbols = new->params; + list_in_scope = &file_symbols; } |