From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31745 invoked by alias); 16 Oct 2003 19:44:45 -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 31700 invoked from network); 16 Oct 2003 19:44:44 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 16 Oct 2003 19:44:44 -0000 Received: from drow by nevyn.them.org with local (Exim 4.24 #1 (Debian)) id 1AAE39-0005TC-T5; Thu, 16 Oct 2003 15:44:43 -0400 Date: Thu, 16 Oct 2003 19:44:00 -0000 From: Daniel Jacobowitz To: Jack J Cc: gdb@sources.redhat.com Subject: Re: debug dynamically linked modules.. Message-ID: <20031016194443.GA20536@nevyn.them.org> Mail-Followup-To: Jack J , gdb@sources.redhat.com References: <20031016193935.98962.qmail@web20507.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031016193935.98962.qmail@web20507.mail.yahoo.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-10/txt/msg00210.txt.bz2 On Thu, Oct 16, 2003 at 12:39:35PM -0700, Jack J wrote: > Hi, > > I would like to know how to debug using gdb > (set breakpoint on routine, etc.) a dynmically linked, > relocated code. > > The platform is RH Linux 9.0. There is some > application > module compiled with -fPIC and -shared, and > -export-dynamic options. > A global structure containing functions is exported by > the DLL module. > The problem: I would like to set breakpoint on one > of the (file static) functions contained in this > structure. > > >From mainline code after call to dlsym(..) (to the > global structure), I try to set break point, and I > get error: "Function xxx not defined.". > > I do 'info shared' on gdb and do see the file being > loaded. Also I do see that "-g" option to add > debug symbols in gcc. > > Is there anything I am missing ? How does one > normally use gdb in such scenario ? > > Any tips, pointers/hints is appreciated. We'd need to see a complete testcase. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer