[RFA] fetch result of locdesc expressions as integer (not address)

Ulrich Weigand uweigand@de.ibm.com
Tue Oct 4 23:06:00 GMT 2011


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



More information about the Gdb-patches mailing list