This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Add proper handling for non-local references in nested functions
- From: Kevin Buettner <kevinb at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 23 Jul 2015 06:44:08 -0700
- Subject: Re: [PATCH] Add proper handling for non-local references in nested functions
- Authentication-results: sourceware.org; auth=none
- References: <54F47563 dot 4050103 at adacore dot com> <54FF0D05 dot 70907 at redhat dot com> <550C1170 dot 9070208 at adacore dot com> <55685B60 dot 3000004 at redhat dot com> <55775EB0 dot 4080701 at adacore dot com> <55AF5F7E dot 5000600 at adacore dot com> <20150722173957 dot 7ed51f18 at pinnacle dot lan> <55B0C583 dot 6050601 at adacore dot com>
On Thu, 23 Jul 2015 12:44:19 +0200
Pierre-Marie de Rodat <derodat@adacore.com> wrote:
> Kevin,
>
> On 07/23/2015 02:39 AM, Kevin Buettner wrote:
> > I had to make the following change in order to obtain a clean build
> > using your patches:
> >
> > 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);
>
> Huh, I actually have a warning I did not notice but not an error, so I
> guess you built GDB as C++. Anyway, this is a big mistake that should
> have broken the feature I intend to add: quite bad! Thank you very much
> for pointing me at it.
I built it using GCC's C compiler, but with -Werror enabled. This flag
turns warnings into errors.
I'll test your new patch today. I've encountered a GDB bug related to
examining variables with within a nested function. I'm hoping that
your patch will fix it...
Kevin