From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12393 invoked by alias); 30 Sep 2010 16:28:56 -0000 Received: (qmail 12370 invoked by uid 22791); 30 Sep 2010 16:28:54 -0000 X-SWARE-Spam-Status: No, hits=-5.6 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; Thu, 30 Sep 2010 16:28:49 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o8UGSfNb020249 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 30 Sep 2010 12:28:41 -0400 Received: from localhost.localdomain.redhat.com (ovpn-113-74.phx2.redhat.com [10.3.113.74]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o8UGSdpB027247; Thu, 30 Sep 2010 12:28:40 -0400 From: Phil Muldoon To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [patch] Add visible flag to breakpoints. References: <201009301542.57057.pedro@codesourcery.com> Reply-to: pmuldoon@redhat.com X-URL: http://www.redhat.com Date: Thu, 30 Sep 2010 17:55:00 -0000 In-Reply-To: <201009301542.57057.pedro@codesourcery.com> (Pedro Alves's message of "Thu, 30 Sep 2010 15:42:56 +0100") 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 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-09/txt/msg00515.txt.bz2 Pedro Alves writes: > Can you give an example of a use case where you would want to be > able to show/hide breakpoints from the user _after_ they've been > created? This looks like something that has potential to confuse > users. E.g., "my gdb sometimes creates breakpoint 10 and then > skips to create breakpoint 20, what gives? where are 11-19?". I don't have one. I purely created the API for scripting utility, I have no objections whatsoever to removing the setter. > If toggling the new visible attribute isn't really necessary, > did you consider instead a new "internal-or-not-internal" flag to > the breakpoint constructor? An internal breakpoint is just a > breakpoint with number < 0, and as such is not visible to > the user. I replied to Dan on this. Could I ask you to read my reply there? Thanks! > As is, your patch does not consider for example the > "delete" command --- it wipes all non-internal breakpoints, even > if hidden! That's potential for breaking the python client > code that creates and manages such breakpoints. I suggest > you go through breakpoint.c and inspect all checks against > b->number < 0 or b->number >= 0. 'delete breakpoints' have always been likely to confuse python scripts that set breakpoints (now, and in this new visibility patch). I did the checks you mentioned. I'm just not sure how to work around it given my objections to using internal breakpoints. What do you think? > >> (create_new_breakpoint): Renamed from create_new_breakpoint. Add >> visible parameter. > > Renamed from create_breakpoint. > >> +# Test invisible breakpooints. Thanks Cheers, Phil