From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8062 invoked by alias); 11 Mar 2011 18:11:23 -0000 Received: (qmail 8051 invoked by uid 22791); 11 Mar 2011 18:11:22 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,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, 11 Mar 2011 18:11:15 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2BIB1Yq004747 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 11 Mar 2011 13:11:12 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p2BHhqTP025679; Fri, 11 Mar 2011 12:43:53 -0500 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 p2BHhqZI006074; Fri, 11 Mar 2011 12:43:52 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id ECDF43797CD; Fri, 11 Mar 2011 10:43:51 -0700 (MST) From: Tom Tromey To: pmuldoon@redhat.com Cc: Doug Evans , gdb-patches@sourceware.org Subject: Re: [patch] [python] Implement stop_p for gdb.Breakpoint References: Date: Fri, 11 Mar 2011 18:27:00 -0000 In-Reply-To: (Phil Muldoon's message of "Fri, 11 Mar 2011 11:39:12 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (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: 2011-03/txt/msg00668.txt.bz2 >>>>> "Phil" == Phil Muldoon writes: Phil> Here is the latest patch. I've added the mutual exclusion to setting Phil> the CLI condition and the Python method. I renamed the method to Phil> 'stop'. Plus all the other review comments regarding the #HAVE Python Phil> defines . I included some changes from the branch that alter how Phil> breakpoints are initialized (the tests require those changes). Thanks. Phil> + error (_("Cannot set a condition where a Python 'stop' " \ No backslash. Phil> +If this method is defined as a sub-class of @code{gdb.Breakpoint}, Phil> +it will be called when the inferior stops at any location of a Phil> +breakpoint which instantiates that sub-class. If the method returns Phil> +@code{True}, the inferior will be stopped at the location of the Phil> +breakpoint, otherwise the inferior will continue. The repeated use of "stops" here makes it read a little strangely. I think it should use "reaches" first, like "... when the inferior reaches any location of a ...". Phil> +/* Function that is called when a Python condition is evaluated. */ Phil> +char *stop_func = "stop"; `static const' Phil> diff --git a/gdb/python/python.c b/gdb/python/python.c Phil> index 3b10d8c..2d7213a 100644 Phil> --- a/gdb/python/python.c Phil> +++ b/gdb/python/python.c Phil> @@ -30,6 +30,7 @@ Phil> #include "exceptions.h" Phil> #include "event-loop.h" Phil> #include "serial.h" Phil> +#include "python.h" You should remove the other inclusion of python.h. Ok with the above changes. Thanks again. Tom