public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* How to call functions which have ifunc symbols (e.g. strcmp) from inside gdb
@ 2011-06-02 12:30 David Gardner
  2011-06-02 13:29 ` Jan Kratochvil
  0 siblings, 1 reply; 3+ messages in thread
From: David Gardner @ 2011-06-02 12:30 UTC (permalink / raw)
  To: gdb

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-06-06 21:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-02 12:30 How to call functions which have ifunc symbols (e.g. strcmp) from inside gdb David Gardner
2011-06-02 13:29 ` Jan Kratochvil
2011-06-06 21:23   ` Thiago Jung Bauermann

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).