From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14191 invoked by alias); 25 Nov 2001 18:30:26 -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 13966 invoked from network); 25 Nov 2001 18:29:07 -0000 Received: from unknown (HELO gash2.peakpeak.com) (207.174.178.17) by sourceware.cygnus.com with SMTP; 25 Nov 2001 18:29:07 -0000 Received: from creche.cygnus.com (ta0195.peakpeak.com [204.144.244.195]) by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id LAA07640; Sun, 25 Nov 2001 11:29:04 -0700 Received: (from tromey@localhost) by creche.cygnus.com (8.9.3/8.9.3) id LAA20136; Sun, 25 Nov 2001 11:30:22 -0700 To: Gdb List Subject: breakpoints in shared libraries X-Zippy: Don't worry, nobody really LISTENS to lectures in MOSCOW, either! .. FRENCH, HISTORY, ADVANCED CALCULUS, COMPUTER PROGRAMMING, BLACK STUDIES, SOCIOBIOLOGY!.. Are there any QUESTIONS?? X-Attribution: Tom Reply-To: tromey@redhat.com From: Tom Tromey Date: Tue, 13 Nov 2001 09:05:00 -0000 Message-ID: <87elmmaeki.fsf@creche.redhat.com> X-SW-Source: 2001-11/txt/msg00134.txt.bz2 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. Tom