From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6853 invoked by alias); 2 Jun 2011 12:30:00 -0000 Received: (qmail 6845 invoked by uid 22791); 2 Jun 2011 12:29:59 -0000 X-SWARE-Spam-Status: Yes, hits=6.9 required=5.0 tests=AWL,BAYES_00,BOTNET,RCVD_IN_RP_RNBL,SARE_SUB_6CONS_WORD X-Spam-Check-By: sourceware.org Received: from no-reverse.interalpha.net (HELO xmos.com) (195.26.247.141) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 02 Jun 2011 12:29:45 +0000 Received: from daveg by nanite.xmos.local with local (Exim 4.76) (envelope-from ) id 1QS720-0008Fh-Az for gdb@sourceware.org; Thu, 02 Jun 2011 13:29:44 +0100 Date: Thu, 02 Jun 2011 12:30:00 -0000 From: David Gardner To: gdb@sourceware.org Subject: How to call functions which have ifunc symbols (e.g. strcmp) from inside gdb Message-ID: <20110602122944.GB30346@xmos.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VbJkn9YxBvnuCH5J" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-06/txt/msg00008.txt.bz2 --VbJkn9YxBvnuCH5J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 705 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! --VbJkn9YxBvnuCH5J Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-length: 836 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJN54I4AAoJEL/SFUF4Ypoc0R0QAKINS0XC/LGhMu+JPt7gJaTz c+DJgzmLTFHTms3a+6WS3KIurTCVesGxfJoTCXQ+C7GnpkAj8Jx1A/oxLJgD+n7u 4TToDNrqaLhnYxl/qPQFONtXBQTTQuuYes35tk2565nOiVVcN4SIqjGLndVfqbpd YTZ6uVmX8uXF69J4E0TjLxl50+Suadi2I2frZG2p3c3FO1rzA8kcymgTUfMyS9gA QXMbtTD7q21yMp+qrVh8FVql3B5vgUzR+xDQqqOHlQE4bYkSPdltr//worWaIkzc 2hfEg6C7t4ybAfC4z4PWMb3Vtn4CBueuOxZDq50Z13N8zcQwr/oxfONiPWzyZTI6 dmNr3T1BFQSYW4j/GQxmPwDZBh1rvVxWhe1bhyKtqNDg1vDXSzB51kxw+C0BFaHS T8pJMdWPaxTkqB4M5dlQJJAvJn29wUGl6XOutlvdNbJE8hGEJftRQLjwzxmhn5ky iIzc6zdKjo5AWx6LUIq8pz002BSHJmjy6jXkJOB74a0SO5uker05nWx0fYNJcIlp JcD6XkdAvpkpFJe1IIWWY0D9QX8AT25xbqWd6VgDqUyqGoLDOkqjupvdzj+YK/oD 5MUZjwLfcS6mlytu82efOBWKDnpGl7fE7kBS3ePXgbo0pTpl1YoqgmlC2Fvz3R+I d/y2agDhs1D1bo3aR2ju =tEYc -----END PGP SIGNATURE----- --VbJkn9YxBvnuCH5J--