From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1533 invoked by alias); 14 Oct 2004 11:56:48 -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 1490 invoked from network); 14 Oct 2004 11:56:47 -0000 Received: from unknown (HELO mclean.mail.mindspring.net) (207.69.200.57) by sourceware.org with SMTP; 14 Oct 2004 11:56:47 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by mclean.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1CI4Ds-0000MA-00; Thu, 14 Oct 2004 07:56:44 -0400 Received: from mindspring.com (localhost [127.0.0.1]) by berman.michael-chastain.com (Postfix) with SMTP id D728D4B359; Thu, 14 Oct 2004 07:57:29 -0400 (EDT) Date: Thu, 14 Oct 2004 19:01:00 -0000 From: Michael Chastain To: rjshaw@netspace.net.au, gdb@sources.redhat.com Subject: Re: newB: How to debug system lib Message-ID: <416E69A9.nail1FK186GT3@mindspring.com> References: <416E0533.3010002@netspace.net.au> In-Reply-To: <416E0533.3010002@netspace.net.au> User-Agent: nail 10.8 6/28/04 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2004-10/txt/msg00315.txt.bz2 Russell Shaw wrote: > In gdb, list 'ungetc' (a gnu libc function) gives: > > No line number information available for address 0x400af9a0 > > I cannot step into the function either. Try this: (gdb) break main (gdb) run (gdb) disassemble ungetc (gdb) list ungetc The "break main; run" will run your test program far enough to load the shared library (glibc). gdb will see the shared library after it is loaded. Hope this helps, Michael Chastain