From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7803 invoked by alias); 7 Mar 2011 20:56:27 -0000 Received: (qmail 7795 invoked by uid 22791); 7 Mar 2011 20:56:27 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_DB,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; Mon, 07 Mar 2011 20:56:23 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p27KuKe6011324 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 7 Mar 2011 15:56:20 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p27KuKRV006321; Mon, 7 Mar 2011 15:56:20 -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 p27KuJKs021290; Mon, 7 Mar 2011 15:56:19 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 67188378339; Mon, 7 Mar 2011 13:56:19 -0700 (MST) From: Tom Tromey To: pmuldoon@redhat.com Cc: gdb-patches@sourceware.org, dje@google.com Subject: Re: [patch] [python] Implement stop_p for gdb.Breakpoint References: Date: Mon, 07 Mar 2011 22:01:00 -0000 In-Reply-To: (Phil Muldoon's message of "Wed, 23 Feb 2011 14:56:19 +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/msg00507.txt.bz2 >>>>> "Phil" == Phil Muldoon writes: Phil> +#if HAVE_PYTHON Phil> +#include "python/python.h" Phil> +#endif You can include this header without the #if. It is designed to work properly even if Python support is not enabled. Phil> +#if HAVE_PYTHON Phil> + /* Evaluate Python breakpoints that have a "condition" Phil> + method implemented. */ Phil> + if (b->py_bp_object) Phil> + bs->stop = gdbpy_stop_p (b->py_bp_object); Phil> +#endif I think you should remove the #if here and have a second implementation of gdbpy_stop_p that just calls internal_error. The idea here is that py_bp_object can only be non-NULL if Python support was actually enabled. Per the other message, just drop the log-printf stuff from the submission for now. We can submit it, or not, later on. (I think we should still put it in Fedora though.) The rest of the code bits look good to me. Tom