This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] Add support for tracking/evaluating dwarf2 location expressions
- To: Daniel Berlin <dberlin at redhat dot com>
- Subject: Re: [PATCH] Add support for tracking/evaluating dwarf2 location expressions
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Fri, 06 Apr 2001 15:02:34 -0400
- Cc: David Taylor <taylor at candd dot org>, gdb-patches at sources dot redhat dot com
- References: <200103302149.QAA25007@texas.cygnus.com> <m27l16sww2.fsf@dynamic-addr-83-177.resnet.rochester.edu> <3AC515A0.30F2C587@cygnus.com> <m27l168xk7.fsf@dynamic-addr-83-177.resnet.rochester.edu>
Daniel Berlin wrote:
>
> Andrew Cagney <ac131313@cygnus.com> writes:
>
> > > So the code doesn't belong in dwarf2read.c. dwarf2read.c is a symbol
> > > reader. dwarf2 location expressions are a way of describing variable
> > > locations. The other code to process the current gdb address
> > > classes/locations is in findvar.c, so that's where i put it.
> >
> > No.
> >
> > if (frame == NULL)
> > frame = selected_frame;
> > ! if (SYMBOL_DWARF2_LOC (var) != NULL)
> > ! return evaluate_dwarf2_locdesc (var, frame, (struct dwarf_block *)
Some code, somewhere must be setting SYMBOL_DWARF2_LOC (var). At a
guess that code is either in dwarf2read.c or in a file using information
obtained from dwarf2read.c.
If SYMBOL_DWARF2_LOC() was replaced by a more generic method then, I'd
expect that method to live in dwarf2read.c since it would be
dwarf2read.c creating a type that contained that method.
> > For this starts to make sense, I suspect it needs to be given some
> > additional context - namely where in dwarf2read.c things are also going
> > to be changed.
>
> Make sense?
> In what way?
It might help explain how this patch ties in to the rest of GDB.
enjoy,
Andrew