From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5388 invoked by alias); 25 Jul 2014 23:51:27 -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 5352 invoked by uid 48); 25 Jul 2014 23:51:25 -0000 From: "dje at google dot com" To: gdb-prs@sourceware.org Subject: [Bug symtab/17201] problems with gdb-generated plt symbols Date: Fri, 25 Jul 2014 23:51:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: symtab X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dje at google 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-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-q3/txt/msg00159.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17201 --- Comment #4 from dje at google dot com --- Re: "I have another bug to add here that may be related": Turns out this is c++ related. In c++ foo(int)@plt == foo(int), whereas in C, which is what "testcase, part 1,2" use, I don't see the problem because foo@plt != foo. Here's what I see with C: bash$ gdb plt-shared-user.x64 (gdb) b foo Breakpoint 1 at 0x400580 (gdb) i b Num Type Disp Enb Address What 1 breakpoint keep y 0x0000000000400580 (gdb) r Starting program: /home/dje/src/play/plt-shared-user.x64 Breakpoint 1, foo () at plt-shared-lib.c:4 4 int foo () { return bar (); } (gdb) i b Num Type Disp Enb Address What 1 breakpoint keep y 0x00007ffff7ff26f7 in foo at plt-shared-lib.c:4 breakpoint already hit 1 time (gdb) Note that gdb properly transferred the breakpoint from foo@plt in the executable to foo in the shared library. [We can certainly have a discussion on whether gdb should even set a breakpoint on foo@plt. I'm leaving that for a separate step.] Here's what I see with C++: bash$ gdb plt-shared-user-cc.x64 (gdb) b foo Breakpoint 1 at 0x400590 (gdb) i b Num Type Disp Enb Address What 1 breakpoint keep y 0x0000000000400590 (gdb) r Starting program: /home/dje/src/play/plt-shared-user-cc.x64 Breakpoint 1, 0x0000000000400590 in foo()@plt () (gdb) i b Num Type Disp Enb Address What 1 breakpoint keep y breakpoint already hit 1 time 1.1 y 0x0000000000400590 1.2 y 0x00007ffff7ff2590 1.3 y 0x00007ffff7ff2707 in foo() at plt-shared-lib-cc.cc:4 (gdb) Geez. -- You are receiving this mail because: You are on the CC list for the bug.