From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4425 invoked by alias); 14 Oct 2004 04:48:09 -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 4416 invoked from network); 14 Oct 2004 04:48:08 -0000 Received: from unknown (HELO mail.netspace.net.au) (203.10.110.71) by sourceware.org with SMTP; 14 Oct 2004 04:48:08 -0000 Received: from [192.168.1.11] (220-253-11-63.VIC.netspace.net.au [220.253.11.63]) by mail.netspace.net.au (Postfix) with ESMTP id 5ABD742ABE for ; Thu, 14 Oct 2004 14:48:07 +1000 (EST) Message-ID: <416E0533.3010002@netspace.net.au> Date: Thu, 14 Oct 2004 11:56:00 -0000 From: Russell Shaw User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040820 Debian/1.7.2-4 MIME-Version: 1.0 To: gdb@sources.redhat.com Subject: newB: How to debug system lib Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-10/txt/msg00312.txt.bz2 Hi, I linked my program with: gcc -g -O0 -lm -o test main.o ldd test gives: libm.so.6 => /usr/lib/debug/libm.so.6 (0x40018000) libc.so.6 => /usr/lib/debug/libc.so.6 (0x4003a000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) I had: LD_LIBRARY_PATH="/usr/lib/debug" In gdb, list 'ungetc' (a gnu libc function) gives: No line number information available for address 0x400af9a0 I cannot step into the function either. Is there a way of doing this without statically linking? (debian 2.6.8.1, libc6 2.3.2.ds1-17, gcc 3.4.2)