From: Nick Roberts <nickrob@snap.net.nz>
To: "Marc Khouzam" <marc.khouzam@ericsson.com>
Cc: <gdb-patches@sourceware.org>
Subject: RE: [RFC] Variable objects for STL containers
Date: Fri, 15 Feb 2008 21:57:00 -0000 [thread overview]
Message-ID: <18358.2724.561605.528467@kahikatea.snap.net.nz> (raw)
In-Reply-To: <6D19CA8D71C89C43A057926FE0D4ADAA04290EED@ecamlmw720.eamcs.ericsson.se>
> > Here's a sample transaction. Currently the variable object must be created
> > after initialisation, e.g.,
> >
> > -var-create - * v
> > ^done,name="var1",numchild="1",value="{...}",type="std::vector<int,std::allocator<int> >"
> > (gdb)
> > -var-list-children --all-values var1
> > ^done,numchild="4",children=[child={name="var1.0",exp="0",numchild="0",value="3",type="long"},child={name="var1.1",exp="1",numchild="0",value="0",type="int"},child={name="var1.2",exp="2",numchild="0",value="0",type="int"},child={name="var1.3",exp="3",numchild="0",value="0",type="int"}]
> >
> > so that GDB doesn't find a ridiculous (uninitialised) number of children.
> > Note there are four children.
>
> Note that I didn't look at the details of the patch yet, so I may be missing
> some info. I noticed that in the var-create response of the example above,
> the number of children is only 1 instead of 4. Is that just a typo?
No, it's real output :-). The patch doesn't check for STL containers until the
user tries to expand the watch expression (-var-list-children is issued)
although I guess, in the case of vectors, it would be quite easy to get the
number of children immediately.
--
Nick http://www.inet.net.nz/~nickrob
next prev parent reply other threads:[~2008-02-15 21:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-13 3:33 Nick Roberts
2008-02-15 14:29 ` Marc Khouzam
2008-02-15 14:42 ` Daniel Jacobowitz
2008-02-15 21:57 ` Nick Roberts [this message]
2008-02-17 13:36 ` Vladimir Prus
2008-02-17 20:18 ` Nick Roberts
2008-02-17 21:57 ` Doug Evans
2008-02-17 22:27 ` Nick Roberts
2008-02-26 2:34 ` Daniel Jacobowitz
2008-02-18 7:45 ` Vladimir Prus
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=18358.2724.561605.528467@kahikatea.snap.net.nz \
--to=nickrob@snap.net.nz \
--cc=gdb-patches@sourceware.org \
--cc=marc.khouzam@ericsson.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