From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18874 invoked by alias); 18 Oct 2013 14:53:13 -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 18862 invoked by uid 89); 18 Oct 2013 14:53:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 Oct 2013 14:53:12 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1VXBQK-00069V-Ng from Luis_Gustavo@mentor.com ; Fri, 18 Oct 2013 07:53:08 -0700 Received: from NA1-MAIL.mgc.mentorg.com ([147.34.98.181]) by svr-orw-fem-01.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 18 Oct 2013 07:53:08 -0700 Received: from [172.30.0.204] ([172.30.0.204]) by NA1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 18 Oct 2013 07:53:08 -0700 Message-ID: <52614B47.4020904@codesourcery.com> Date: Fri, 18 Oct 2013 14:53:00 -0000 From: Luis Machado Reply-To: lgustavo@codesourcery.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Andrew Burgess , "gdb-patches@sourceware.org" Subject: Re: [PATCH] Permanent breakpoints degrade to normal breakpoints on enable References: <52614A15.7070301@broadcom.com> In-Reply-To: <52614A15.7070301@broadcom.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00566.txt.bz2 Hi, On 10/18/2013 11:47 AM, 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've removed the extra line and written a test to cover this case. > > OK to apply? > > Andrew > > gdb/ChangeLog > > 2013-10-18 Andrew Burgess > > * breakpoint.c (enable_breakpoint_disp): Remove setting of > enabled_state for permanent breakpoints. > > gdb/testsuite/ChangeLog > > 2013-10-18 Andrew Burgess > > * gdb.arch/i386-permbkpt.exp: Extend the existing tests, and add > more tests. > > diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c > index 911f7b5..53ece71 100644 > --- a/gdb/breakpoint.c > +++ b/gdb/breakpoint.c > @@ -14666,8 +14666,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); > It does look bogus. The fix makes sense to me. Luis