Short g/G packets?

Daniel Jacobowitz drow@false.org
Fri Mar 24 02:07:00 GMT 2006


Hi Andrew,

I came across this comment in remote.c today:

+             /* A short packet that didn't include the register's
+                 value, this implies that the register is zero (and
+                 not that the register is unavailable).  Supply that
+                 zero value.  */

And these two supporting emails:

http://sourceware.org/ml/gdb/2001-11/msg00164.html
http://sourceware.org/ml/gdb-patches/2003-12/msg00070.html

But that's all I can find - it's not in the manual, it's not used by any
stubs that I could get ahold of to check, et cetera.  Do you have a
reference for this interpretation?  Do you know any stubs taking advantage
of it?

I'm working on better handling for unavailable registers at the moment,
and automatic use of both g/G and p/P in the same session.  I'm planning
to assume that registers not reported in the g packet response are
not part of the g packet, and try querying for them with p packets
if the target supports those; this is more logical behavior.  This
fits just fine with the current documentation, but not with the
implementation.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb mailing list