From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7435 invoked by alias); 16 Jun 2005 18:29:45 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 7424 invoked by uid 22791); 16 Jun 2005 18:29:41 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 16 Jun 2005 18:29:41 +0000 Received: from drow by nevyn.them.org with local (Exim 4.51) id 1Diz7Q-00014m-Ia; Thu, 16 Jun 2005 14:29:36 -0400 Date: Thu, 16 Jun 2005 18:29:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: victor.stinner@haypocalc.com, gdb@sources.redhat.com Subject: Re: Display libc function names instead of address ? Message-ID: <20050616182936.GA4062@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , victor.stinner@haypocalc.com, gdb@sources.redhat.com References: <1118892960.12713.5.camel@haypopc> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-SW-Source: 2005-06/txt/msg00174.txt.bz2 On Thu, Jun 16, 2005 at 09:21:09PM +0200, Eli Zaretskii wrote: > > Date: Thu, 16 Jun 2005 05:36:00 +0200 > > From: Victor STINNER > > > > I woud like to know if it is possible to display libc functions name > > instead of their address. Example : > > > > (1) (...) // prepare parameters > > call 0x8048728 > > > > (2) jmp *0x804a6b0 // in relocation table, at 0x08048728 > > In response of what command(s) would you like to see the function > names? Can you post an example of a command and its current output? Here's an example of the effect of the patch I just posted to gdb-patches. With an unpatched GDB, load gdb on a Linux system and run "disas captured_main": 0x0807c0ac : mov %eax,0x4(%esp) 0x0807c0b0 : movl $0x5,(%esp) 0x0807c0b7 : call 0x807b3a0 <_init+952> 0x0807c0bc : movl $0x0,(%esp) 0x0807c0c3 : mov $0x8239443,%eax 0x0807c0c8 : mov %eax,0x4(%esp) 0x0807c0cc : call 0x807b3a0 <_init+952> With the patch applied: 0x0807c0ac : mov %eax,0x4(%esp) 0x0807c0b0 : movl $0x5,(%esp) 0x0807c0b7 : call 0x807b3a0 0x0807c0bc : movl $0x0,(%esp) 0x0807c0c3 : mov $0x8239443,%eax 0x0807c0c8 : mov %eax,0x4(%esp) 0x0807c0cc : call 0x807b3a0 This doesn't work absolutely everywhere, of course. It requires target-specific support inside BFD. -- Daniel Jacobowitz CodeSourcery, LLC