From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9572 invoked by alias); 29 Oct 2013 17:52:37 -0000 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 Received: (qmail 9563 invoked by uid 89); 29 Oct 2013 17:52:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mms3.broadcom.com Received: from mms3.broadcom.com (HELO mms3.broadcom.com) (216.31.210.19) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 29 Oct 2013 17:52:36 +0000 Received: from [10.9.208.57] by mms3.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.5)); Tue, 29 Oct 2013 10:52:01 -0700 X-Server-Uuid: B86B6450-0931-4310-942E-F00ED04CA7AF Received: from IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) by IRVEXCHCAS08.corp.ad.broadcom.com (10.9.208.57) with Microsoft SMTP Server (TLS) id 14.1.438.0; Tue, 29 Oct 2013 10:52:25 -0700 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) with Microsoft SMTP Server id 14.1.438.0; Tue, 29 Oct 2013 10:52:26 -0700 Received: from [10.177.73.52] (unknown [10.177.73.52]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id E654A246A4; Tue, 29 Oct 2013 10:52:24 -0700 (PDT) Message-ID: <526FF5D7.7000909@broadcom.com> Date: Tue, 29 Oct 2013 17:52:00 -0000 From: "Andrew Burgess" User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: "Pedro Alves" cc: "gdb-patches@sourceware.org" , lgustavo@codesourcery.com Subject: Re: I think permanent breakpoints are fundamentally broken as is References: <52614A15.7070301@broadcom.com> <52615F0B.4050008@redhat.com> In-Reply-To: <52615F0B.4050008@redhat.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00909.txt.bz2 On 18/10/2013 5:17 PM, Pedro Alves wrote: > On 10/18/2013 03:47 PM, Andrew Burgess wrote: >> This patch: >> https://sourceware.org/ml/gdb-patches/2012-01/msg00964.html >> >> introduced what I believe is a stray line that causes permanent >> breakpoints to become normal breakpoints if the user ever tries >> to "enable" the permanent breakpoint. > > I actually think "permanent breakpoints" are quite weird beasts, > both from a user interface, and implementation perspectives. OK, given all you've said I'd like to just commit the patch below. This is basically removing the stray line I mention above but without adding any new tests. I'd never even heard about "permanent breakpoints" before I spotted the odd looking extra line, so only added the tests as "good practice" to ensure the same bug was not added again. Given that we're not really sure exactly how permanent breakpoints should operate I think just removing the stray line for now would be best, then if anyone re-works permanent breakpoints they'll not have to find/consider this tiny "ooops". OK to apply? Thanks, Andrew gdb/ChangeLog 2013-10-29 Andrew Burgess * breakpoint.c (enable_breakpoint_disp): Remove setting of enabled_state for permanent breakpoints. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 608463d..b5bb3da 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -14725,8 +14725,6 @@ enable_breakpoint_disp (struct breakpoint *bpt, enum bpdisp disposition, if (bpt->enable_state != bp_permanent) bpt->enable_state = bp_enabled; - bpt->enable_state = bp_enabled; - /* Mark breakpoint locations modified. */ mark_breakpoint_modified (bpt);