From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2520 invoked by alias); 21 Nov 2003 19:16:56 -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 2513 invoked from network); 21 Nov 2003 19:16:55 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 21 Nov 2003 19:16:55 -0000 Received: from drow by nevyn.them.org with local (Exim 4.24 #1 (Debian)) id 1ANGlz-0008SN-Hq for ; Fri, 21 Nov 2003 14:16:55 -0500 Date: Fri, 21 Nov 2003 19:16:00 -0000 From: Daniel Jacobowitz To: gdb@sources.redhat.com Subject: Re: hacking shlib/dlopened breakpoints Message-ID: <20031121191655.GA32483@nevyn.them.org> Mail-Followup-To: gdb@sources.redhat.com References: <20031121125502.GA7194@skynet.ie> <20031121191521.GB7751@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031121191521.GB7751@lucon.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-11/txt/msg00207.txt.bz2 On Fri, Nov 21, 2003 at 11:15:21AM -0800, H. J. Lu wrote: > On Fri, Nov 21, 2003 at 12:55:02PM +0000, Caolan McNamara wrote: > > I'm looking at breakpoints in dlopened libraries at the moment, > > setting a breakpoint after my library is dlopened works of course > > and, as in the example below, I see that gdb can move the address of > > the breakpoint in the .so when it is unloaded and reloaded during > > execution, but on re-execution of the little program I get > > " > > Warning: > > Cannot insert breakpoint X. > > Error accessing memory address 0xe8535a: Input/output error. > > " > > > > Naturally the library isn't loaded at the start of re-execution, but I > > hoped that the the breakpoint state would change to bp_shlib_disabled > > and get reenabled when the .so reappears. > > > > Is there a way to tell gdb to stop right after the symbols of a > dlopened DSO is loaded? set stop-on-solib-events 1 There's a documented catch load command, but it only works on HP/UX. Fixing it for SysV shared libraries is somewhere down my list of things to do. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer