This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch/rfc] Revise REGISTER_SIM_REGNO()
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Cc: gdb-patches at sources dot redhat dot com, Richard dot Earnshaw at arm dot com
- Date: Wed, 15 May 2002 11:45:59 +0100
- Subject: Re: [patch/rfc] Revise REGISTER_SIM_REGNO()
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> 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.