From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22852 invoked by alias); 7 May 2013 17:59:47 -0000 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 Received: (qmail 22794 invoked by uid 48); 7 May 2013 17:59:47 -0000 From: "jan.kratochvil at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug c++/15440] New: set print object produces values not matching inferior Date: Tue, 07 May 2013 17:59:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jan.kratochvil at redhat 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 X-SW-Source: 2013-q2/txt/msg00206.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=15440 Bug #: 15440 Summary: set print object produces values not matching inferior Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned@sourceware.org ReportedBy: jan.kratochvil@redhat.com Classification: Unclassified Target: x86_64-unknown-linux-gnu #include class C { public: int i=1; virtual void m() {} }; class D : public C { public: int i=2; } d; C *cp = &d; int main() { printf("%d\n",cp->i); } (gdb) start 13 printf("%d\n",cp->i); (gdb) p cp->i $1 = 1 (gdb) set print object on (gdb) p cp->i $2 = 2 ^^^ = GDB output (gdb) next 1 ^^ = inferior output -- 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.