Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@redhat.com>
To: Richard.Earnshaw@arm.com
Cc: Andrew Cagney <ac131313@cygnus.com>, gdb-patches@sources.redhat.com
Subject: Re: [patch/rfc] Revise REGISTER_SIM_REGNO()
Date: Thu, 16 May 2002 16:35:00 -0000	[thread overview]
Message-ID: <3CE43EE2.59DD49E3@redhat.com> (raw)
In-Reply-To: <200205151045.LAA02092@cam-mail2.cambridge.arm.com>

Richard Earnshaw wrote:
> 
> > 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.

How about having target_fetch_register set them to -1 in the cache?
See remote.c:remote_fetch_registers:

   set_register_cached (i, -1);

This tells the rest of GDB that the value of the register is
"not available".  You could unconditionally mark certain regs
as unavailable whenever target_fetch_registers is called.


  reply	other threads:[~2002-05-16 23:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-14 15:48 Andrew Cagney
2002-05-15  3:46 ` Richard Earnshaw
2002-05-16 16:35   ` Michael Snyder [this message]
2002-05-17  2:07     ` Richard Earnshaw
2002-05-17 10:49       ` Michael Snyder
2002-05-18  3:55         ` Richard Earnshaw
2002-05-18 12:39           ` Daniel Jacobowitz
2002-05-19 21:35 ` Andrew Cagney
2002-05-28 19:19   ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3CE43EE2.59DD49E3@redhat.com \
    --to=msnyder@redhat.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=ac131313@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox