This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Supplying regsets containing pseudoregisters
Jim Blandy <jimb@redhat.com> writes:
> Andrew Cagney <cagney@gnu.org> writes:
> > It sounds like the regcache layout needs to be changed. I'd break the
> > raw EV registers down into hi:lo pairs so that each part can be
> > supplied separatly - this appears to more closely reflect the
> > underlying implementation.
>
> Okay. This is what I'd started doing thinking of it as a workaround,
> so it works for me.
Actually, maybe not.
The sim provides access to the GPRs as full 64-bit values. It calls
sim_fetch_register, gets 64 bits, and then calls supply_register on
the full 64 bits.
But core files and libthread_db operate on gregset_t values, which
contain only the lower 32 bits of the GPRs. The regset 'supply'
functions want to call regcache_raw_supply on only the lower halves.
So does gdbsim_fetch_register need to be tweaked somehow? How would
it know how to distribute the 64-bit value across high/low pairs?
Do I need to use separate regcache layouts for sim and native? How
would I even do that?