From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15900 invoked by alias); 22 Sep 2012 09:19:12 -0000 Received: (qmail 15881 invoked by uid 48); 22 Sep 2012 09:19:11 -0000 From: "niko.sams at gmail dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: mi X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: niko.sams at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2012-q3/txt/msg00378.txt.bz2 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 int main() { struct { std::vector 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 >",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.