This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA/RFC] dwarf2-frame read_reg


Mark Kettenis wrote:
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?

Yep, the reg size is 3 bytes. When it's pushed onto the stack, it occupies 3 bytes of memory. Funky, huh? The cpu can only reach 24 bits worth of address space.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]