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: [RFC] h8300 "info registers" fix


> Date: Wed, 13 Sep 2006 13:49:26 -0700
> From: "Michael Snyder" <Michael.Snyder@palmsource.com>
> 
> Daniel: 
> >On Wed, Sep 13, 2006 at 01:20:09PM -0700, Michael Snyder wrote:
> >> Grumble -- is the regcache kept in host order, or target order?
> >
> >Target order.
> >
> >[Which is apparently a bit weird; most debug interfaces I've seen
> >lately use host order.]
> 
> That's right -- it's a relic of the fact that the original 
> "register cache" was the register packet itself, which is 
> generated on the target side.  The target doesn't know anything
> about the host, so there's no way that can be in host order.
> 
> Anyway, in that case, the gdb_byte[4] approach is more likely
> to be correct, eh?

Yes, gdb_byte is the type we use for target byte buffers.

> I think I understand the problem now -- the pseudo-register is
> only one byte, so it's "natural" to call pseudo_register_read
> with a one byte buffer.  But the physical register is four bytes,
> so you have to have a four byte buffer to read it.
> 
> Wonder why it ever worked?   ;-/

The fact that almost all variables on a 32-bit machines are
word-aligned?

Mark


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