RFC: s390x: correct core file register layout
Jim Blandy
jimb@redhat.com
Tue Jun 3 05:48:00 GMT 2003
Michael Snyder <msnyder@redhat.com> writes:
> Jim Blandy wrote:
> >
> > 2003-05-23 Jim Blandy <jimb@redhat.com>
> >
> > * s390-nat.c (supply_gregset, fill_gregset): On the s390x, the
> > elements of gregset_t are 64 bits each, but access registers
> > are still 32 bits, so they're packed two per gregset_t
> > element. Unpack/pack them properly.
>
> What sort of comment are you looking for?
Well, lewd ones, in particular. But given the nature of the patch I
wasn't expecting much along those lines, and would have settled for
"this isn't the way we deal with native targets, idiot, look at
foo-nat.c" and stuff like that.
I take it it's kosher to use CONFIG_ARCH_foo in -nat.c files, right?
I feel icky writing that in these modern gdbarch'ed times. But as
long as we're getting types like gregset_t from the system headers,
the decision on how registers are laid out within that type is
inevitably a compile-time thing, so it's legitimate to use #ifdefs to
select the appropriate code. Right?
Ideally, I was hoping someone from IBM would check it for
correctness. But they don't seem to follow these lists,
unfortunately.
More information about the Gdb-patches
mailing list