From: Daniel Jacobowitz <drow@false.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: victor.stinner@haypocalc.com, gdb@sources.redhat.com
Subject: Re: Display libc function names instead of address ?
Date: Thu, 16 Jun 2005 19:03:00 -0000 [thread overview]
Message-ID: <20050616190315.GA5572@nevyn.them.org> (raw)
In-Reply-To: <uwtou13fo.fsf@gnu.org>
On Thu, Jun 16, 2005 at 09:56:11PM +0200, Eli Zaretskii wrote:
> > 0x0807c0ac <captured_main+76>: mov %eax,0x4(%esp)
> > 0x0807c0b0 <captured_main+80>: movl $0x5,(%esp)
> > 0x0807c0b7 <captured_main+87>: call 0x807b3a0 <setlocale@plt>
> > 0x0807c0bc <captured_main+92>: movl $0x0,(%esp)
> > 0x0807c0c3 <captured_main+99>: mov $0x8239443,%eax
> > 0x0807c0c8 <captured_main+104>: mov %eax,0x4(%esp)
> > 0x0807c0cc <captured_main+108>: call 0x807b3a0 <setlocale@plt>
>
> I don't understand: what is this "setlocale@plt" thingy?
It's a "synthetic" symbol. It's not really in the symbol table; but
BFD provides it as an informative marker. It means that the call
instruction will go to a PLT entry for setlocale.
> Anyway, I tried this with GDB 6.1 on a Debian box and saw this:
>
> 0x0807a8bb <captured_main+91>: call 0x8079bec <setlocale>
>
> which seems to show the names of library functions just fine.
I haven't worked with Debian/woody in a bit, so I'd forgotten about
this. If you try it on the new Debian stable release, you'll see the
calls to _init. They're the result of a performance improvement in
binutils.
[I can go into more detail if you're curious. They would sometimes
show up on the older binutils, but I can not remember the
circumstances.]
> I then tried this with GDB 6.3 and a MinGW build of Emacs on a
> Windows XP box and saw things like this:
>
> 0x0100216d <main+341>: movl $0x1,0xffffffd4(%ebp)
> 0x01002174 <main+348>: movl $0x128a50f,0x4(%esp)
> 0x0100217c <main+356>: movl $0x0,(%esp)
> 0x01002183 <main+363>: call 0x114f7e0 <setlocale>
Yes, Windows is not affected by this problem - it's related to shared
libraries and dynamic linking, and Windows DLL linking is different
enough that it does not have this quirk - though I'm sure it has plenty
of its own.
--
Daniel Jacobowitz
CodeSourcery, LLC
next prev parent reply other threads:[~2005-06-16 19:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-16 3:36 Victor STINNER
2005-06-16 4:43 ` Daniel Jacobowitz
2005-06-16 15:04 ` Victor STINNER
2005-06-16 15:20 ` Daniel Jacobowitz
2005-06-16 15:46 ` Victor STINNER
2005-06-16 18:21 ` Eli Zaretskii
2005-06-16 18:29 ` Daniel Jacobowitz
2005-06-16 18:56 ` Eli Zaretskii
2005-06-16 19:03 ` Daniel Jacobowitz [this message]
2005-06-17 9:44 ` Eli Zaretskii
2005-06-17 11:44 ` Victor STINNER
2005-06-17 13:56 ` Daniel Jacobowitz
2005-06-18 13:12 ` Eli Zaretskii
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=20050616190315.GA5572@nevyn.them.org \
--to=drow@false.org \
--cc=eliz@gnu.org \
--cc=gdb@sources.redhat.com \
--cc=victor.stinner@haypocalc.com \
/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: link
Be 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