From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24141 invoked by alias); 8 Apr 2010 22:21:10 -0000 Received: (qmail 24128 invoked by uid 22791); 8 Apr 2010 22:21:09 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 08 Apr 2010 22:21:05 +0000 Received: (qmail 26161 invoked from network); 8 Apr 2010 22:21:03 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 8 Apr 2010 22:21:03 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [patch][python] Add breakpoint support. Date: Thu, 08 Apr 2010 22:21:00 -0000 User-Agent: KMail/1.12.2 (Linux/2.6.31-20-generic; KDE/4.3.2; x86_64; ; ) Cc: Joel Brobecker , Phil Muldoon , Tom Tromey , Eli Zaretskii References: <4BB0B063.6000600@redhat.com> <4BBE4A34.3020301@redhat.com> <20100408214455.GM19194@adacore.com> In-Reply-To: <20100408214455.GM19194@adacore.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201004082321.01822.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00199.txt.bz2 On Thursday 08 April 2010 22:44:55, Joel Brobecker wrote: > This is indeed a general issue that is worth looking at. But for the > specific case of breakpoint saving/restoring, can we just add a couple > of methods to the breakpoints class? The downside is that the code > has to be written in C, I guess, as opposed to python. Hmmm, we want > the glue code to be as minimal, right? I'd just like to point out that we already have code in the tree (and for a decade) that dumps tracepoints into a file; the file can be sourced as a cli script afterwards. See breakpoint.c:tracepoint_save_command. Since the tracepoint/breakpoints merge, it is trivial to extend that function to dump breakpoints as well. (gdb) help save-tracepoints Save current tracepoint definitions as a script. Use the 'source' command in another debug session to restore them. -- Pedro Alves