From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23279 invoked by alias); 21 Feb 2012 19:27:44 -0000 Received: (qmail 23242 invoked by uid 22791); 21 Feb 2012 19:27:41 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 21 Feb 2012 19:26:49 +0000 From: "tromey at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug varobj/13708] Erasing an element from std::vector isn't reported by -var-update, when pretty printing is enabled Date: Tue, 21 Feb 2012 19:27:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: varobj X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at redhat dot com X-Bugzilla-Status: WAITING X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status CC Message-ID: In-Reply-To: References: 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-q1/txt/msg00303.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=13708 Tom Tromey changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |WAITING CC| |tromey at redhat dot com --- Comment #1 from Tom Tromey 2012-02-21 19:25:56 UTC --- I think gdb is correct here. Here's my analysis. I'm moving this to WAITING pending your agreement. > But then after line 17, (that erases the last element of the vector), > -var-update on the varobj does not report the fact that the variable got > deleted. Here are the last two -var-update calls: -var-update --all-values var1 ^done,changelist=[{name="var1",value="{...}",in_scope="true",type_changed="false",new_num_children="2",displayhint="array",dynamic="1",has_more="0",new_children=[{name="var1.[1]",exp="[1]",numchild="0",value=" \"fila\"",type="std::basic_string, std::allocator >",thread-id="1",displayhint="string",dynamic="1"}]}] -var-update --all-values var1 ^done,changelist=[] The first -var-update shown reports 2 elements. Then the inferior adds an element and removes it. Then we do another -var-update. At this point, the vector is identical to the last time it was updated. If I instead -var-update at line 14 in the inferior, I get: ^done,changelist=[{name="var1",value="{...}",in_scope="true",type_changed="false",new_num_children="2",displayhint="array",dynamic="1",has_more="0"}] Here is the test input I am using, run like: gdb -i=mi2 ./pr < script: set data-directory /usr/share/gdb -enable-pretty-printing b 10 run -var-create - * v -var-list-children --all-values var1 b 14 cont -var-update --all-values var1 b 22 cont p/r v p v -var-update --all-values var1 -- 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.