* dwarf2read.c (read_func_scope): Restore local_symbols and
authorJim Blandy <jimb@codesourcery.com>
Fri, 8 Nov 2002 19:33:37 +0000 (19:33 +0000)
committerJim Blandy <jimb@codesourcery.com>
Fri, 8 Nov 2002 19:33:37 +0000 (19:33 +0000)
param_symbols after we finish the function context.  (Based on a
patch from David Edelsohn.)

gdb/ChangeLog
gdb/dwarf2read.c

index 4470392898ba18d1b63753599c31b3191dbb6382..166ac5b9f02e6a25dc5ff5c7b1bbe549cca910e1 100644 (file)
@@ -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.
index 7ede81b71f18d0c3a6967cf5c4b67555b248409d..7e017c6dfc0c8e0377a58d3c08b5861ab6505e55 100644 (file)
@@ -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;
 }
 
This page took 0.035683 seconds and 4 git commands to generate.