Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Raphael Zulliger <zulliger@indel.ch>
To: gdb@sourceware.org
Subject: Remote protocol: undocumented return value for 'p'
Date: Fri, 17 Dec 2010 16:10:00 -0000	[thread overview]
Message-ID: <4D0B8B6F.8010107@indel.ch> (raw)

Hi

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[0] == 'x')
     {
       regcache_raw_supply (regcache, reg->regnum, NULL);
       return 1;
     }


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.

Raphael


             reply	other threads:[~2010-12-17 16:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-17 16:10 Raphael Zulliger [this message]
2010-12-17 16:46 ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D0B8B6F.8010107@indel.ch \
    --to=zulliger@indel.ch \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox