This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/RFC] dwarf2-frame read_reg
> Date: Tue, 11 Apr 2006 21:42:01 -0700
> From: "Jim Blandy" <jimb@red-bean.com>
>
> On 4/11/06, Michael Snyder <msnyder@redhat.com> wrote:
> > I want you guys to vett this change. I was getting wrong results
> > on a target where sizeof (SP) != sizeof (void *). The local func
> > read_reg was calling extract_unsigned_integer with the wrong size.
>
> Well, extract_typed_address requires the type of the register to be
> some sort of pointer. read_reg is given as a callback to the Dwarf
> expression evaluator in dwarf2expr.c, so it could be handed any
> register at all.
>
> How about unpack_long (buf, register_type (gdbarch, regnum))?
> Definitely regression-test this on several platforms...
This is likely to be wrong for platforms where addresses are signed.
Michael, what kind of funny target is this? It has a stack pointer
register, but its size is different from the size of pointers?
Mark