Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Question on attribute save-restore in reg elements (target descriptions).
@ 2008-05-09 21:42 Anmol P. Paralkar
  2008-05-11 21:29 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Anmol P. Paralkar @ 2008-05-09 21:42 UTC (permalink / raw)
  To: gdb

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?

  PS: Please could you also clarify the term 'inferior function'?

Thank you,
Anmol.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Question on attribute save-restore in reg elements (target  descriptions).
  2008-05-09 21:42 Question on attribute save-restore in reg elements (target descriptions) Anmol P. Paralkar
@ 2008-05-11 21:29 ` Daniel Jacobowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2008-05-11 21:29 UTC (permalink / raw)
  To: Anmol P. Paralkar; +Cc: gdb

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-11 21:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-09 21:42 Question on attribute save-restore in reg elements (target descriptions) Anmol P. Paralkar
2008-05-11 21:29 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox