From: David Gardner <daveg@xmos.com>
To: gdb@sourceware.org
Subject: How to call functions which have ifunc symbols (e.g. strcmp) from inside gdb
Date: Thu, 02 Jun 2011 12:30:00 -0000 [thread overview]
Message-ID: <20110602122944.GB30346@xmos.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 705 bytes --]
Hi,
Calling strcmp from inside gdb thusly:
(gdb) call strcmp("foo", "foo")
$3 = -146921376
Gives unexpected values.
I note that there is a bug for this already
(http://sourceware.org/bugzilla/show_bug.cgi?id=12347) and this mentions
that the strcmp symbol is the ifunc wrapper for the strcmp function, but
this seems counter-intuitive for a user of gdb.
Is there an alternative method of calling ifunc-enabled functions which
can be used for calls (and related items such as conditional
breakpoints) within gdb? Or is just an open bug which is awaiting a fix
and I should work around by making wrappers for such functions which I
want to call from within gdb?
Many thanks for any help!
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next reply other threads:[~2011-06-02 12:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-02 12:30 David Gardner [this message]
2011-06-02 13:29 ` Jan Kratochvil
2011-06-06 21:23 ` Thiago Jung Bauermann
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=20110602122944.GB30346@xmos.com \
--to=daveg@xmos.com \
--cc=gdb@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: 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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).