This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug symtab/17201] problems with gdb-generated plt symbols
- From: "dje at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 25 Jul 2014 23:51:24 +0000
- Subject: [Bug symtab/17201] problems with gdb-generated plt symbols
- Auto-submitted: auto-generated
- References: <bug-17201-4717 at http dot sourceware dot org/bugzilla/>
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 <foo@plt>
(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 <foo()@plt>
(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 <MULTIPLE>
breakpoint already hit 1 time
1.1 y 0x0000000000400590 <foo()@plt>
1.2 y 0x00007ffff7ff2590 <foo()@plt>
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.