This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
remote target register set?
- From: Jim Robertson <robertso at somerset dot sps dot mot dot com>
- To: gdb <gdb at sources dot redhat dot com>
- Date: Wed, 25 Sep 2002 15:33:44 -0500
- Subject: remote target register set?
I have recently implemented the gdb remote protocol interface for a powerpc
simulator. In doing so, I did not find a general way for gdb to let the
remote target know the set of registers gdb was going to use for the current
debugging session. Instead, I had to look into the rs6000-tdep.c file.
This makes it difficult to write generic code for the remote target since
there is no way for gdb to indicate what architecture it is debugging. (The
register order and number of registers will be dependent on the
architecture defined in gdb.)
It also appears that the powerpc:common architecture setting has added the
AltiVec register set sometime between gdb 5.1 and the latest version.
Consequently I am unable to have a "common" target in my simulator that
works with various versions of gdb.
Is there a way for gdb to let the remote target know what registers it will
be expecting for the read and write register commands? If not, would it be
worthwhile to add one? It would be helpful to know the name, size, and
order of all registers that will be used for the current debugging
session. Without knowing much about the remote debugging protocol,
something like the following might work:
query register info support: qRegInfo?
response: OK - willing to accept register info
'' - not willing to accept register info
send register info qRegInfo:n,s;n,s;
Where 'n' is the name of the register
being defined, and 's' is the size, in
bytes, of this register. The order is
the order within the read/write register
command.
response : OK - all is understood
E?? - This target cannot work with the
current gdb architecture.
Any thoughts?
Jim
p.s. It would also be useful to know the registers that are required for
the expedited response from the target.
--
-----------------------------------------------------------------------------
Jim.Robertson@Motorola.com