public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "dje at google dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug symtab/17201] problems with gdb-generated plt symbols Date: Fri, 25 Jul 2014 23:51:00 -0000 [thread overview] Message-ID: <bug-17201-4717-v8Qpslzkou@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-17201-4717@http.sourceware.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.
next prev parent reply other threads:[~2014-07-25 23:51 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-07-25 23:01 [Bug symtab/17201] New: " dje at google dot com 2014-07-25 23:01 ` [Bug symtab/17201] " dje at google dot com 2014-07-25 23:02 ` dje at google dot com 2014-07-25 23:06 ` dje at google dot com 2014-07-25 23:51 ` dje at google dot com [this message] 2014-07-25 23:52 ` dje at google dot com 2014-07-25 23:54 ` dje at google dot com 2014-07-26 19:42 ` dje at google dot com 2023-01-30 10:52 ` aburgess at redhat dot com 2023-02-12 6:21 ` cvs-commit at gcc dot gnu.org 2023-02-12 6:40 ` aburgess at redhat dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-17201-4717-v8Qpslzkou@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).