From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15723 invoked by alias); 25 Nov 2001 18:38:13 -0000 Mailing-List: contact gdb-help@sourceware.cygnus.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 15607 invoked from network); 25 Nov 2001 18:36:56 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sourceware.cygnus.com with SMTP; 25 Nov 2001 18:36:56 -0000 Received: from drow by nevyn.them.org with local (Exim 3.32 #1 (Debian)) id 16849Q-0004I4-00 for ; Sun, 25 Nov 2001 13:37:12 -0500 Date: Tue, 13 Nov 2001 09:41:00 -0000 From: Daniel Jacobowitz To: Gdb List Subject: Re: breakpoints in shared libraries Message-ID: <20011125133712.A16400@nevyn.them.org> Mail-Followup-To: Gdb List References: <87elmmaeki.fsf@creche.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87elmmaeki.fsf@creche.redhat.com> User-Agent: Mutt/1.3.23i X-SW-Source: 2001-11/txt/msg00135.txt.bz2 On Sun, Nov 25, 2001 at 11:30:21AM -0700, Tom Tromey wrote: > A while back I changed Insight so that it would save and restore > breakpoints. This is really handy, but it has a problem that I think > requires changes to gdb itself. > > Suppose I set a breakpoint in a shared library. I find on my Linux > box I can only do this after the inferior has been started. So I use > `b main', then `run', then set the breakpoints I really care about. > (This gets old fast, btw.) > > When Insight saves breakpoints, it doesn't know about this. How could > it? So it saves everything. When I restart Insight and load my old > session, the breakpoints that are interesting to me don't load, > because gdb doesn't yet know about the shared libraries. > > How can this be fixed? I don't know the answer. One idea I had is to > annotate each breakpoint with information about what shared library it > comes from. Then, defer processing for that breakpoint until the > shared library is actually loaded by the inferior. > > Maybe there would be other ways to accomplish the same thing. It > would be nice if I didn't ever have to do the whole `b main; r' thing > in the first place. But as it stands this problem is a real > impediment to my typical uses for gdb. I think the best approach for this is to expose an interface to create shlib_disabled breakpoints. Then they'll be automatically re-enabled when the library containing that symbol is loaded. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer