public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* PowerPC 603 Register Set Clarification
@ 2005-10-27  2:59 Ron McCall
  2005-10-27 15:35 ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Ron McCall @ 2005-10-27  2:59 UTC (permalink / raw)
  To: gdb

Hi,

I am unsure as to how to handle the ASR register and the two placeholder
registers that are defined for the PowerPC 603 with respect to the 'g'
and 'G' packets and was hoping someone could clarify it for me.  I am
currently working with GDB 6.3.50.20051026.

In rs6000-tdep.c, PPC_OEA_SPRS includes the ASR register which is
declared S64 (a 64-bit register on 64-bit systems that doesn't exist on
32-bit systems).  The 603 isn't 64-bit but the register still appears to
take up a register number nonetheless.  Does it also take up space (16
hex chars) in the 'G' packet, which is then intended to be skipped by
the stub?  If so, should the stub then fill in zeroes for this register
in the 'g' packet?

Also in rs6000-tdep.c, registers_603[] contains two placeholder
registers as register numbers 122 and 123.  Both are declared R0
(placeholder for a register that doesn't exist).  Again, they appear to
take up register numbers but do they also take up space in the 'G' and
'g' packets?  In this case there is no declared size, or perhaps that is
meant to mean that they are zero sized and thus take up no space?

Thanks for the help!

Ron McCall

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

* Re: PowerPC 603 Register Set Clarification
  2005-10-27  2:59 PowerPC 603 Register Set Clarification Ron McCall
@ 2005-10-27 15:35 ` Daniel Jacobowitz
  2005-10-27 18:30   ` Ron McCall
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2005-10-27 15:35 UTC (permalink / raw)
  To: gdb

On Wed, Oct 26, 2005 at 10:58:56PM -0400, Ron McCall wrote:
> Hi,
> 
> I am unsure as to how to handle the ASR register and the two placeholder
> registers that are defined for the PowerPC 603 with respect to the 'g'
> and 'G' packets and was hoping someone could clarify it for me.  I am
> currently working with GDB 6.3.50.20051026.
> 
> In rs6000-tdep.c, PPC_OEA_SPRS includes the ASR register which is
> declared S64 (a 64-bit register on 64-bit systems that doesn't exist on
> 32-bit systems).  The 603 isn't 64-bit but the register still appears to
> take up a register number nonetheless.  Does it also take up space (16
> hex chars) in the 'G' packet, which is then intended to be skipped by
> the stub?  If so, should the stub then fill in zeroes for this register
> in the 'g' packet?

The best way to answer this question is to configure GDB appropriately
to talk to a 603 target, and then run "maint info registers".  That
will tell you the expected offsets of every register.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

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

* Re: PowerPC 603 Register Set Clarification
  2005-10-27 15:35 ` Daniel Jacobowitz
@ 2005-10-27 18:30   ` Ron McCall
  2005-10-27 18:35     ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Ron McCall @ 2005-10-27 18:30 UTC (permalink / raw)
  To: gdb



--- Daniel Jacobowitz <drow@false.org> wrote:
> The best way to answer this question is to configure
> GDB appropriately
> to talk to a 603 target, and then run "maint info
> registers".  That
> will tell you the expected offsets of every
> register.

There isn't a registers subcommand under maintenance
info but there is a maintenance print raw-registers
command that looks like it gives the desired
information.  It says that ASR and the two placeholder
registers have a size of zero.  So, that would imply
that both the 'G' and 'g' packets would just omit them
all.  However, I do see GDB trying to read these three
registers via the 'p' packet.  In that case, should a
stub reply with an error or an empty response?  It
doesn't seem possible to returns zeroes since there is
no size associated with these registers.

Thanks for the help!

Ron McCall

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

* Re: PowerPC 603 Register Set Clarification
  2005-10-27 18:30   ` Ron McCall
@ 2005-10-27 18:35     ` Daniel Jacobowitz
  2005-10-27 19:08       ` Ron McCall
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2005-10-27 18:35 UTC (permalink / raw)
  To: Ron McCall; +Cc: gdb

On Thu, Oct 27, 2005 at 11:30:13AM -0700, Ron McCall wrote:
> 
> 
> --- Daniel Jacobowitz <drow@false.org> wrote:
> > The best way to answer this question is to configure
> > GDB appropriately
> > to talk to a 603 target, and then run "maint info
> > registers".  That
> > will tell you the expected offsets of every
> > register.
> 
> There isn't a registers subcommand under maintenance
> info but there is a maintenance print raw-registers
> command that looks like it gives the desired
> information.  It says that ASR and the two placeholder
> registers have a size of zero.  So, that would imply
> that both the 'G' and 'g' packets would just omit them
> all.  However, I do see GDB trying to read these three
> registers via the 'p' packet.  In that case, should a
> stub reply with an error or an empty response?  It
> doesn't seem possible to returns zeroes since there is
> no size associated with these registers.

Sorry, I maint maint print registers.  raw-reg will work just as well.

I'm not sure (re the P packet).  An empty response won't work.  But 00
should work well enough, or else use 'x'.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

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

* Re: PowerPC 603 Register Set Clarification
  2005-10-27 18:35     ` Daniel Jacobowitz
@ 2005-10-27 19:08       ` Ron McCall
  0 siblings, 0 replies; 5+ messages in thread
From: Ron McCall @ 2005-10-27 19:08 UTC (permalink / raw)
  To: gdb

--- Daniel Jacobowitz <drow@false.org> wrote:
> Sorry, I maint maint print registers.  raw-reg will
> work just as well.
> 
> I'm not sure (re the P packet).  An empty response
> won't work.  But 00
> should work well enough, or else use 'x'.

I missed maint print registers after seeing the
raw-registers subcommand.  Good to know.  Thanks.

I didn't know about the 'x' response but I see it in
fetch_register_using_p() in remote.c and sure enough,
that's what makes it happy!  (An error, empty response
or '0' response certainly don't make it happy.)

Thanks!

Ron McCall

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

end of thread, other threads:[~2005-10-27 19:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-27  2:59 PowerPC 603 Register Set Clarification Ron McCall
2005-10-27 15:35 ` Daniel Jacobowitz
2005-10-27 18:30   ` Ron McCall
2005-10-27 18:35     ` Daniel Jacobowitz
2005-10-27 19:08       ` Ron McCall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).