[RFC] dwarf2_read_address(): sign extend as appropriate

Ulrich Weigand uweigand@de.ibm.com
Mon Apr 23 15:06:00 GMT 2007


Kevin Buettner wrote:

> Any comments regarding the patch below?
> 
> I wrote it last summer, so my memory about it is rather hazy aside
> from the fact that it fixed a bunch of C++ frame base problems on
> mips64 targets.
> 
> It shouldn't affect any architecture other than mips because mips is
> the only one which defines an integer_to_address method.  It also
> addresses Andrew's FIXME comment from nearly four years ago...
> 
> 	* dwarf2expr.c (unsigned_address_type): Add forward declaration.
> 	(dwarf2_read_address): Sign extend return address as required by
> 	target architecture.

I've recently changed a very similar place, dwarf_expr_read_reg in
dwarf2loc.c, to use a new "address_from_register" function to solve
the same problem:
http://sourceware.org/ml/gdb-patches/2006-11/msg00134.html

Is there any reason you couldn't use the same function here?

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