From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7031 invoked by alias); 14 Oct 2004 04:53:49 -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 7014 invoked from network); 14 Oct 2004 04:53:48 -0000 Received: from unknown (HELO mail.netspace.net.au) (203.10.110.76) by sourceware.org with SMTP; 14 Oct 2004 04:53:48 -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 E9353D69E4 for ; Thu, 14 Oct 2004 14:52:17 +1000 (EST) Message-ID: <416E062E.7040009@netspace.net.au> Date: Thu, 14 Oct 2004 15:37: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/msg00313.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) Also, does gdb need the libc source code files in addition to the libc6-dbg binaries?