[patch/rfc] Revise REGISTER_SIM_REGNO()

Richard Earnshaw rearnsha@arm.com
Wed May 15 03:46:00 GMT 2002


> Hello,
> 
> The attached, per comments from RichardE, revises the definition and use 
> of REGISTER_SIM_REGNO.  I think I've managed to preserve existing behavour.
> 
> Briefly, REGISTER_SIM_REGNO() [Hmm, do I doco `legacy' behavour?] 
> returns a cardinal indicating the simulators register number, or 
> SIM_REGNO_UNAVAILABLE/-1 when the register isn't there.
> 
> To preserve current behavour on existing targets, 
> LEGACY_SIM_REGNO_IGNORE is returned by the default 
> legacy_register_sim_regno() function.

I'd like to see a target have a way to report that it is permanently 
unable to recover a register -- because there's nothing in the protocol to 
allow its recovery.

For example, I've added the privileged mode registers to my ARM target 
code; when the target is using a ptrace() interface for debugging a user 
program, then these registers are never available and it's pointless 
having gdb report them.

Note -- again this is not an ABI issue, the same ABI can be in use when 
debugging kernel code; it's clearly a property of the target interface.

Now to the point of why I'm saying this in response to this patch :-)

LEGACY_SIM_REGNO_IGNORE seems to be saying almost exactly the same thing.  
So why "legacy"?

R.




More information about the Gdb-patches mailing list