This is the mail archive of the
mailing list for the GDB project.
Remote protocol: undocumented return value for 'p'
- From: Raphael Zulliger <zulliger at indel dot ch>
- To: gdb at sourceware dot org
- Date: Fri, 17 Dec 2010 17:10:23 +0100
- Subject: Remote protocol: undocumented return value for 'p'
During the development of a GDB stub, I encountered a "hidden feature":
the 'p n' command (reading the value of a register) accepts an
undocumented return value, which is not mentioned in the official GDB
documentation: 'x'. the source code looks like this:
/* If this register is unfetchable, tell the regcache. */
if (buf == 'x')
regcache_raw_supply (regcache, reg->regnum, NULL);
At some point during the development of my stub it was important for me
to have this 'hidden feature'. Unfortunately, I can't remember why it
was important - and now it seems that I don't rely on that anymore...
However, at that time, it would have helped me to save some time if I
could just read it from the PDF instead of searching it in the code.
The final question is: Is this feature missing in the documentation by
'intention' or by 'mistake'? If it's the latter case, I would suggest
adding it. Let me know if I should create an according patch.