Add proper handling for non-local references in nested functions

Message ID 20150722173957.7ed51f18@pinnacle.lan
State New, archived
Headers

Commit Message

Kevin Buettner July 23, 2015, 12:39 a.m. UTC
  On Wed, 22 Jul 2015 11:16:46 +0200
Pierre-Marie de Rodat <derodat@adacore.com> wrote:

> Here it is! 
> <https://sourceware.org/ml/gdb-patches/2015-07/msg00607.html> I just 
> rebased my work on non-local references on top of this cleanup and 
> performed the changes you asked me to do. Just a question:
[...]
> Regtested again on x86_64-linux: no regression. Ok to push? Thank you!

Hi Pierre-Marie,

I had to make the following change in order to obtain a clean build
using your patches:
  

Patch

diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index e20aead..d6e3d55 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -11457,7 +11457,7 @@  read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
 
   newobj = pop_context ();
   /* Make a block for the local symbols within.  */
-  block = finish_block (newobj->name, &newobj->static_link,
+  block = finish_block (newobj->name, newobj->static_link,
 			&local_symbols, newobj->old_blocks,
                         lowpc, highpc);