From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10794 invoked by alias); 11 Oct 2005 17:43:00 -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 10784 invoked by uid 22791); 11 Oct 2005 17:42:57 -0000 Received: from s0106000f3d96cb6d.vc.shawcable.net (HELO takamaka.act-europe.fr) (24.81.152.226) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 11 Oct 2005 17:42:57 +0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id DE23147E77; Tue, 11 Oct 2005 10:42:55 -0700 (PDT) Date: Tue, 11 Oct 2005 17:43:00 -0000 From: Joel Brobecker To: gdb@sources.redhat.com Subject: New command to save breakpoints? Message-ID: <20051011174255.GB1015@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2005-10/txt/msg00070.txt.bz2 Hello, some of our customers have asked us to enhance the debugger to be able to save breakpoints in a file, in order to reset them later. We feel it's a useful functionality to have and share with the rest of the GDB community. Within AdaCore, we have adopted the interface that Apple has implemented in their own version of the debugger. So they added a command called "save-breakpoint" which will generate a set of GDB commands re-creating each breakpoint. To reset the breakpoints, one just "source"s this file. I personally like the simplicity of this approach. There are a few issues we need to discuss, however: . What happens if one of the breakpoints is inside a shared library and that the symbols for the library haven't been loaded yet? The current result depends on the "breakpoint pending" setting. . What happens if one of the breakpoints locations is OBE and leads to an error? Again, depending on the "breakpoint pending" setting, the script will either set a pending breakpoint, ignore silently, or abort. What do others think of this approach? If we can agree on it, I will work on the implementation, probably drawing most of the code from the last Apple source drop. Thanks, -- Joel