From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23300 invoked by alias); 16 Jun 2005 18:56:56 -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 23274 invoked by uid 22791); 16 Jun 2005 18:56:48 -0000 Received: from legolas.inter.net.il (HELO legolas.inter.net.il) (192.114.186.24) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 16 Jun 2005 18:56:48 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-72-217.inter.net.il [80.230.72.217]) by legolas.inter.net.il (MOS 3.5.8-GR) with ESMTP id EQA43408 (AUTH halo1); Thu, 16 Jun 2005 21:56:17 +0300 (IDT) Date: Thu, 16 Jun 2005 18:56:00 -0000 Message-Id: From: Eli Zaretskii To: victor.stinner@haypocalc.com, gdb@sources.redhat.com In-reply-to: <20050616182936.GA4062@nevyn.them.org> (message from Daniel Jacobowitz on Thu, 16 Jun 2005 14:29:36 -0400) Subject: Re: Display libc function names instead of address ? Reply-to: Eli Zaretskii References: <1118892960.12713.5.camel@haypopc> <20050616182936.GA4062@nevyn.them.org> X-SW-Source: 2005-06/txt/msg00175.txt.bz2 > Date: Thu, 16 Jun 2005 14:29:36 -0400 > From: Daniel Jacobowitz > Cc: victor.stinner@haypocalc.com, gdb@sources.redhat.com > > 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 I don't understand: what is this "setlocale@plt" thingy? Anyway, I tried this with GDB 6.1 on a Debian box and saw this: 0x0807a8ab : mov %eax,0xffffff10(%ebp) 0x0807a8b1 : add $0xfffffff8,%esp 0x0807a8b4 : push $0x81ca040 0x0807a8b9 : push $0x5 0x0807a8bb : call 0x8079bec 0x0807a8c0 : add $0xfffffff8,%esp 0x0807a8c3 : push $0x81ca040 0x0807a8c8 : push $0x0 0x0807a8ca : call 0x8079bec 0x0807a8cf : add $0x20,%esp 0x0807a8d2 : add $0xfffffff8,%esp 0x0807a8d5 : push $0x81ca041 which seems to show the names of library functions just fine. 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 : movl $0x1,0xffffffd4(%ebp) 0x01002174 : movl $0x128a50f,0x4(%esp) 0x0100217c : movl $0x0,(%esp) 0x01002183 : call 0x114f7e0 ... 0x010021e1 : movl $0x0,(%esp) 0x010021e8 : call 0x114f7c0 <_isatty> ... 0x010021f5 : mov 0xffffffe4(%ebp),%eax 0x010021f8 : movl $0x128a646,0x4(%esp) 0x01002200 : mov %eax,0x8(%esp) 0x01002204 : mov 0x12fab38,%eax 0x01002209 : add $0x40,%eax 0x0100220c : mov %eax,(%esp) 0x0100220f : call 0x114f830 which again shows library functions with their full name. So I'm unsure what is the problem. Am I missing something?