From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1692 invoked by alias); 15 Oct 2003 20:14:02 -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 1684 invoked from network); 15 Oct 2003 20:14:02 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 15 Oct 2003 20:14:02 -0000 Received: from drow by nevyn.them.org with local (Exim 4.24 #1 (Debian)) id 1A9s1x-0000m2-8w; Wed, 15 Oct 2003 16:14:01 -0400 Date: Wed, 15 Oct 2003 20:14:00 -0000 From: Daniel Jacobowitz To: Jack J Cc: gdb@sources.redhat.com Subject: Re: debugging dynamic link/load code on Linux Message-ID: <20031015201401.GA2425@nevyn.them.org> Mail-Followup-To: Jack J , gdb@sources.redhat.com References: <20031015201057.77923.qmail@web20510.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031015201057.77923.qmail@web20510.mail.yahoo.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-10/txt/msg00205.txt.bz2 On Wed, Oct 15, 2003 at 01:10:57PM -0700, Jack J wrote: > Hi, > > I am new to gdb mailing list. > I have a question and if this list is not appropriate, > please apologize. I am hoping someone can shed some > light with helpful tips and pointers. > > question: How do I set a breakpoint in a module/code > which is dynamically linked/loaded in Linux ? > > I tried setting a breaking point (in gdb) after > dlsym() but, gdb still complains of function not > found. > I did have it compiled with "-g" gcc option. > > -- gdb output-- > > (gdb) b test_routine > Function "test_routine" not defined. > (gdb) l test_routine > Function "test_routine" not defined. Once the library has been loaded you should be able to. Can you build a small testcase, and a complete session transcript that show the problem? Does "info shared" show the module? -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer