public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "niko.sams at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug mi/14607] New: -var-list-children reports wrong numchild count
Date: Sat, 22 Sep 2012 09:19:00 -0000 [thread overview]
Message-ID: <bug-14607-4717@http.sourceware.org/bugzilla/> (raw)
http://sourceware.org/bugzilla/show_bug.cgi?id=14607
Bug #: 14607
Summary: -var-list-children reports wrong numchild count
Product: gdb
Version: 7.5
Status: NEW
Severity: normal
Priority: P2
Component: mi
AssignedTo: unassigned@sourceware.org
ReportedBy: niko.sams@gmail.com
Classification: Unclassified
To reproduce see this example debug session:
cat main.cpp
#include <vector>
int main()
{
struct {
std::vector<int> a;
} struct1;
struct1.a.push_back(10);
struct1.a.push_back(100);
return 0;
}
gdb --interpreter=mi2 testdebugee
-enable-pretty-printing
break main.cpp:12
-exec-run
-var-create struct1 @ struct1
-var-list-children --all-values struct1
^done,numchild="1",children=[child={name="struct1.public",exp="public",numchild="1",value="",thread-id="1"}],has_more="0"
-var-list-children --all-values struct1.public
^done,numchild="1",children=[child={name="struct1.public.a",exp="a",numchild="0",value="{...}",type="std::vector<int,
std::allocator<int>
>",thread-id="1",displayhint="array",dynamic="1"}],has_more="0"
^^^^ should be "2"
#correct:
-var-list-children --all-values struct1.public.a
^done,numchild="2",displayhint="array",children=[child={name="struct1.public.a.[0]",exp="[0]",numchild="0",value="10",type="int",thread-id="1"},child={name="struct1.public.a.[1]",exp="[1]",numchild="0",value="100",type="int",thread-id="1"}],ha
#correct:
-var-info-num-children struct1.public.a
^done,numchild="2"
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
next reply other threads:[~2012-09-22 9:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-22 9:19 niko.sams at gmail dot com [this message]
2012-09-22 9:21 ` [Bug mi/14607] " niko.sams at gmail dot com
2012-09-22 9:24 ` niko.sams at gmail dot com
2022-05-25 19:00 ` tromey at sourceware dot org
2023-08-31 17:29 ` tromey at sourceware dot org
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=bug-14607-4717@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=gdb-prs@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).