Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: "Anmol P. Paralkar" <b07584@freescale.com>
Cc: gdb@sourceware.org
Subject: Re: Question on attribute save-restore in reg elements (target 	descriptions).
Date: Sun, 11 May 2008 21:29:00 -0000	[thread overview]
Message-ID: <20080511212900.GB9153@caradoc.them.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0805091631040.22847@ld0159-tx32>

On Fri, May 09, 2008 at 04:41:58PM -0500, Anmol P. Paralkar wrote:
> Hello,
>
>  Per Appendix F, Sec. F.2.5 Registers, of the GDB User Manual:
>
>  save-restore
>
>     Whether the register should be preserved across inferior function
>     calls; this must be either yes or no. The default is yes, which
>     is appropriate for most registers except for some system control
>     registers; this is not related to the target's ABI.
>
>  In our target description file, we have a lot of special purpose
>  registers about which nothing might be assumed either way, so in
>  addition to 'yes' and 'no', can we have an "unspecified" value to
>  this attribute, (say, denoted by '?')? In what way does GDB use this
>  information?

GDB uses this information to make a decision, so clearly it can not be
unspecified - GDB would have to do something unspecified...

When the user types "print foo()" GDB will save and restore those
registers which are marked with save-restore="yes".  Generally this
is what you want for GPRs but not what you want for global system
state like coprocessor control registers.

-- 
Daniel Jacobowitz
CodeSourcery


      reply	other threads:[~2008-05-11 21:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-09 21:42 Anmol P. Paralkar
2008-05-11 21:29 ` Daniel Jacobowitz [this message]

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=20080511212900.GB9153@caradoc.them.org \
    --to=drow@false.org \
    --cc=b07584@freescale.com \
    --cc=gdb@sourceware.org \
    /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