From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15752 invoked by alias); 8 Sep 2009 07:52:00 -0000 Received: (qmail 15698 invoked by uid 48); 8 Sep 2009 07:51:59 -0000 Date: Tue, 08 Sep 2009 07:52:00 -0000 From: "noamraph at gmail dot com" To: gdb-prs@sourceware.org Message-ID: <20090908075158.10616.noamraph@gmail.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug mi/10616] New: Pretty-printed MI vars with children get "{...}" instead of the wanted string X-Bugzilla-Reason: CC 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: 2009-q3/txt/msg00222.txt.bz2 Hello, If a pretty-printed variable has children, in MI the to_string method is ignored, and istead "{...}" is used. To recreate: Download bug.c, bug.py (They are the same as in bug 10615). > gdb --int mi2 --nx bug > -enable-pretty-printing > python execfile('bug.py') > b main > r > n > -var-create m * m ^done,name="m",numchild="0",value="{...}",type="MainStruct",thread-id="1",has_more="1" The value should have been "x=0". To fix this, remove those two lines from varobj.c: if (dynamic_varobj_has_child_method (var)) return xstrdup ("{...}"); They suggest that this behaviour was intentional. However, I would prefer if it weren't so. I wrote a pretty-printer for a struct. The struct has many fields, but only two are important. So I wrote a pretty-printer which keeps the children of the struct, but uses to_string to display a string like "x=3,y=5", which helps me see the important state of the struct in the GUI debugger without having to open the struct in the tree view, so I have more space for watching other variables. Thanks, Noam -- Summary: Pretty-printed MI vars with children get "{...}" instead of the wanted string Product: gdb Version: archer Status: UNCONFIRMED Severity: normal Priority: P2 Component: mi AssignedTo: unassigned at sourceware dot org ReportedBy: noamraph at gmail dot com CC: gdb-prs at sourceware dot org,tromey at redhat dot com http://sourceware.org/bugzilla/show_bug.cgi?id=10616 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.