From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29941 invoked by alias); 8 Oct 2010 13:35:23 -0000 Received: (qmail 29872 invoked by uid 22791); 8 Oct 2010 13:35:23 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,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; Fri, 08 Oct 2010 13:35:18 +0000 Received: (qmail 14481 invoked from network); 8 Oct 2010 13:35:17 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 8 Oct 2010 13:35:17 -0000 From: Pedro Alves To: pmuldoon@redhat.com Subject: Re: [patch] Add visible flag to breakpoints. Date: Fri, 08 Oct 2010 13:35:00 -0000 User-Agent: KMail/1.13.2 (Linux/2.6.33-29-realtime; KDE/4.4.2; x86_64; ; ) Cc: gdb-patches@sourceware.org, dan@codesourcery.com References: <201009301741.32379.pedro@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201010081435.15174.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-10/txt/msg00139.txt.bz2 On Friday 08 October 2010 13:50:34, Phil Muldoon wrote: > The @var{internal} argument has no effect with watchpoints. Should it be an error instead (or made to work)? The non-python bits looked fine. I'd prefer Tom or someone else to look and approve those. I did notice: > #define BPPY_REQUIRE_VALID(Breakpoint) \ > do { \ > - if (! bpnum_is_valid ((Breakpoint)->number)) \ > + if (Breakpoint == NULL) \ > return PyErr_Format (PyExc_RuntimeError, _("Breakpoint %d is invalid."), \ > (Breakpoint)->number); \ '(Breakpoint)->number' when Breakpoint is NULL is not going to work. Also, missing ()s: if ((Breakpoint) == NULL) I would also suggest using a VEC for the breakpoints instead of a linked list. (Also, the old code appeared to have been designed for O(1) access to the python breakpoint objects given a breakpoing number: I have no clue it if that matters but you could preserve that easily with two VECs or bppy_breakpoints arrays.) -- Pedro Alves