Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: nickrob@snap.net.nz (Nick Roberts)
To: Pawel Piech <pawel.piech@windriver.com>
Cc: "André Pönitz" <andre.poenitz@nokia.com>, gdb@sourceware.org
Subject: Re: -stack-list-locals and children
Date: Mon, 29 Jun 2009 22:46:00 -0000	[thread overview]
Message-ID: <19017.17441.798047.264363@totara.tehura.co.nz> (raw)
In-Reply-To: <4A48DEF3.3070407@windriver.com>

 > No kidding!  2 more questions then:
 > 
 > - does stack-list-args support the --simple-values option?

[-stack-list-arguments]

Not --simple-values directly but you can access it quite easily using the SHOW-VALUES
option which is really the PRINT-VALUES option of -stack-list-locals since the two
MI commands share the same code, namely, list_args_or_locals.

For example,

(gdb) 
-stack-list-arguments 0 0 1
^done,stack-args=[frame={level="0",args=[name="i",name="j"]},frame={level="1",args=[name="argc",name="argv"]}]
(gdb) 
-stack-list-arguments 1 0 1
^done,stack-args=[frame={level="0",args=[{name="i",value="0x7ffff7871c81"},{name="j",value="0"}]},frame={level="1",args=[{name="argc",value="1"},{name="argv",value="0x7fffffffe7b8"}]}]
(gdb) 
--stack-list-arguments 2 0 1
^done,stack-args=[frame={level="0",args=[{name="i",type="int *",value="0x7ffff7871c81"},{name="j",type="int",value="0"}]},frame={level="1",args=[{name="argc",type="int",value="1"},{name="argv",type="char **",value="0x7fffffffe7b8"}]}]
(gdb) 

as SHOW-VALUES=2 corresponds to --simple-values.


 > - how long has this feature been around?

Since GDB 6.1, which goes back to the start of 2004.  I added --simple-values
(and documented it) for the locals buffer in Emacs but it's availability to
-stack-list-arguments was just a side effect, so I never documented that.

I think it would be quite easy to change -stack-list-arguments to accept
--no-values, --simple-values and --all-values if people want it.

-- 
Nick                                           http://www.inet.net.nz/~nickrob


  parent reply	other threads:[~2009-06-29 22:46 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-28 19:03 Niko Sams
2009-06-28 19:31 ` Vladimir Prus
2009-06-28 19:56   ` Niko Sams
2009-06-29  5:26     ` Vladimir Prus
2009-06-29  7:13       ` Niko Sams
     [not found]       ` <629542d40906290012p33c5504pde20ddcd7da3474a@mail.gmail.com>
2009-06-29  8:18         ` Vladimir Prus
2009-06-29  9:30           ` Niko Sams
2009-06-29  9:45             ` Vladimir Prus
2009-06-29 11:49             ` Nick Roberts
2009-06-29  7:42 ` André Pönitz
2009-06-29  8:13   ` Nick Roberts
2009-06-29  8:37     ` André Pönitz
2009-06-29  9:33       ` Niko Sams
2009-06-30 10:14       ` Nick Roberts
2009-06-29 15:34     ` Pawel Piech
2009-06-29 16:40       ` Vladimir Prus
2009-06-29 16:55         ` Vladimir Prus
2009-06-29 22:46       ` Nick Roberts [this message]
2009-06-29 23:07         ` Pawel Piech
2009-06-30  3:26           ` Pawel Piech
2009-06-29  8:59   ` Vladimir Prus
2009-06-29  9:32     ` André Pönitz
2009-06-29  9:39       ` Vladimir Prus
2009-06-29 10:13         ` André Pönitz
2009-06-30  9:42           ` Vladimir Prus
2009-06-29  9:36     ` Niko Sams

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=19017.17441.798047.264363@totara.tehura.co.nz \
    --to=nickrob@snap.net.nz \
    --cc=andre.poenitz@nokia.com \
    --cc=gdb@sourceware.org \
    --cc=pawel.piech@windriver.com \
    /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