From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26732 invoked by alias); 27 Jan 2012 00:43:24 -0000 Received: (qmail 26724 invoked by uid 22791); 27 Jan 2012 00:43:24 -0000 X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-vw0-f41.google.com (HELO mail-vw0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 27 Jan 2012 00:43:10 +0000 Received: by vbbfd1 with SMTP id fd1so1031929vbb.0 for ; Thu, 26 Jan 2012 16:43:09 -0800 (PST) Received: by 10.52.90.71 with SMTP id bu7mr2046592vdb.63.1327624989453; Thu, 26 Jan 2012 16:43:09 -0800 (PST) MIME-Version: 1.0 Received: by 10.52.90.71 with SMTP id bu7mr2046587vdb.63.1327624989376; Thu, 26 Jan 2012 16:43:09 -0800 (PST) Received: by 10.220.229.1 with HTTP; Thu, 26 Jan 2012 16:43:09 -0800 (PST) In-Reply-To: <4F21EE80.104@earthlink.net> References: <4F21EE80.104@earthlink.net> Date: Fri, 27 Jan 2012 01:47:00 -0000 Message-ID: Subject: Re: [PATCH] Make enable reset disposition From: Doug Evans To: Stan Shebs Cc: gdb-patches@sourceware.org X-System-Of-Record: true Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2012-01/txt/msg00930.txt.bz2 On Thu, Jan 26, 2012 at 4:23 PM, Stan Shebs wrote: > In the process of developing an additional enablement option (to be posted > soon), I ran across this little bit of behavior that seems wrong; if you = do > "enable once" and then "enable" on a breakpoint, the disposition is > unchanged - the breakpoint is still going to get disabled after being hit. > =A0(Similarly for "enable delete" breakpoints.) > > While one could argue that this is good, because you can toggle a > breakpoint's enablement independently of its ultimate disposition, the > downside is that you're stuck with your original choice; once you've set a > breakpoint's disposition to delete for instance, there is no way to undo > that, and when the breakpoint is hit, it's gone, conditions and command l= ist > and all. > > Having "enable" reset dispositions has its own fault, namely that if you = do > just "enable" to enable all breakpoints, and they have different > dispositions, then all the dispositions are reset en masse, and you would > have to manually do a combination of "enable once", "enable delete", etc = to > get those back to desired values. > > A more complicated solution might be to introduce an additional flavor or > option of enable command ("enable always"?), but I wouldn't like to try to > explain the different flavors to users, and chances are that nobody would > remember it anyway. Hi. I don't know that I would call it *more* complicated. IIUC, there two independent(/orthogonal) attributes of a breakpoint (once vs delete vs always, and enabled vs disabled) and they are controlled by the same command. Oops. =46rom a u/i perspective keeping the orthogonality feels right. Also, having "enable" reset dispositions en masse does bother me. Does this affect tbreak-created breakpoints? It feels like adding "always" doesn't muddy the waters any more than they already are. :-) If one were do do this again, having a new command instead of "enable" may be easier for user's to digest and remember.