This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] fetch result of locdesc expressions as integer (not address)
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: brobecker at adacore dot com (Joel Brobecker)
- Cc: gdb-patches at sourceware dot org, jan dot kratochvil at redhat dot com (Jan Kratochvil)
- Date: Wed, 5 Oct 2011 01:05:52 +0200 (CEST)
- Subject: Re: [RFA] fetch result of locdesc expressions as integer (not address)
Joel Brobecker wrote:
> > It seems the problem is a bit more complex: different callers
> > of decode_locdesc have different expectations. As the comment
> > before the routine says:
> >
> > NOTE drow/2003-11-18: This function is called in two situations
> > now: for the address of static or global variables (partial symbols
> > only) and for offsets into structures which are expected to be
> > (more or less) constant.
>
> That's true, but my interpretation was the callers of decode_locdesc
> should know which they expect it to me, and thus know to apply
> the integer_to_address correction.
Well, maybe they should, but right now they don't, and neither does
your patch add any such correction. The point I was trying to make
is that therefore, your patch as it is, while fixing one class of
bugs on some targets, may simultaneously introduce a different class
of bugs on other targets. I'm not sure this is a good idea ...
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com