From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17652 invoked by alias); 20 Feb 2003 14:59:31 -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 17639 invoked from network); 20 Feb 2003 14:59:30 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by 172.16.49.205 with SMTP; 20 Feb 2003 14:59:30 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18lu3j-0000jp-00; Thu, 20 Feb 2003 11:00:31 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18lsAU-0007Vk-00; Thu, 20 Feb 2003 09:59:22 -0500 Date: Thu, 20 Feb 2003 14:59:00 -0000 From: Daniel Jacobowitz To: Lev Assinovsky Cc: Kevin Buettner , gdb@sources.redhat.com Subject: Re: gdb + dynamic libs problem Message-ID: <20030220145922.GB28816@nevyn.them.org> Mail-Followup-To: Lev Assinovsky , Kevin Buettner , gdb@sources.redhat.com References: <3F6F4712B759A34ABD453A8B39C10D6226694D@bagman.edm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F6F4712B759A34ABD453A8B39C10D6226694D@bagman.edm.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-02/txt/msg00406.txt.bz2 On Thu, Feb 20, 2003 at 01:26:13PM +0300, Lev Assinovsky wrote: > > -----Original Message----- > > From: Kevin Buettner [mailto:kevinb@redhat.com] > > Sent: Thursday, February 20, 2003 12:42 AM > > To: Lev Assinovsky; gdb@sources.redhat.com > > Subject: Re: gdb + dynamic libs problem > > > > > > On Feb 18, 2:08pm, Lev Assinovsky wrote: > > > > > I try to debug the application where dynamic objects > > > are loaded through user's dlopen explicit call. > > > The only way to set breakpoint in .so is to open source after > > > .so got loaded (I have to detect this moment myself). > > > > GDB can help you with this if you you do ``set > > stop-on-solib-events 1''. > > You'll probably want to do this well after your program has started > > though to avoid stopping every time one of the shared > > libraries specified > > on the link line gets loaded. > > > > > I perform source opening by issue the commands "shared library" and > > > "list :1". > > > > Have you disabled ``auto-solib-add''? If not, you shouldn't need to > > invoke the ``sharedlibrary'' command directly. I.e, gdb should > > automatically load the shared libraries for you (unless you've told it > > not to). > > Here the point is! I don't have "classic" shared libraries like > libxxx.so. And application is not linked with them. > I have xxx.so and load it via dlopen function. I.e. gdb doesn't have > any knowledge about c++ files in my shared object until I type in "sharedlibrary" command! GDB should still automatically load symbols for them. You shouldn't need to use "sharedlibrary". -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer