This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] dwarf2_read_address(): sign extend as appropriate
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: kevinb at redhat dot com (Kevin Buettner)
- Cc: gdb-patches at sources dot redhat dot com
- Date: Mon, 23 Apr 2007 17:05:20 +0200 (CEST)
- Subject: Re: [RFC] dwarf2_read_address(): sign extend as appropriate
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