From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24420 invoked by alias); 9 Apr 2010 16:17:47 -0000 Received: (qmail 24410 invoked by uid 22791); 9 Apr 2010 16:17:46 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 09 Apr 2010 16:17:41 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o39GHXQA005244 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 9 Apr 2010 12:17:33 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o39GHW4J014144; Fri, 9 Apr 2010 12:17:32 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o39GHVWq025822; Fri, 9 Apr 2010 12:17:31 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 27DEC379786; Fri, 9 Apr 2010 10:17:31 -0600 (MDT) From: Tom Tromey To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: PR8554: New command to save breakpoints to a file References: <201004090341.14389.pedro@codesourcery.com> Reply-To: tromey@redhat.com Date: Fri, 09 Apr 2010 16:17:00 -0000 In-Reply-To: <201004090341.14389.pedro@codesourcery.com> (Pedro Alves's message of "Fri, 9 Apr 2010 03:41:14 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/msg00260.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> (I finished this instead of dumping it.) Thanks. I do like this approach. Pedro> Add a new save-breakpoints command to save breakpoint definitions Pedro> to a file. I'd personally prefer "save breakpoints", with a space, and make save-tracepoints a deprecated alias for "save tracepoints". What do you (and others) think of this? I tend to like simple commands with spaces, especially when a subcommand comes along. Pedro> The new breakpoint_ops->print_recreate method implementation for Pedro> all catchpoints is always mostly a simplified version of Pedro> breakpoint_ops->print_mention method. Could you enlighten me on a historical (?) point? Why is it that some kinds of breakpoints have methods like this and some do not? Is this an incomplete transition, or an intentional design choice? Pedro> + if (tp->thread != -1) Pedro> + fprintf_unfiltered (fp, " thread %d", tp->thread); Pedro> + Pedro> + if (tp->task != 0) Pedro> + fprintf_unfiltered (fp, " task %d", tp->task); Pedro> + Pedro> if (tp->cond_string) Pedro> fprintf_unfiltered (fp, " if %s", tp->cond_string); I don't think this syntax will work for a conditional catchpoint. Our Python-based implementation gets this wrong as well. I think you need a separate "cond" command in the output. Tom