From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16893 invoked by alias); 14 Jul 2008 15:22:25 -0000 Received: (qmail 16883 invoked by uid 22791); 14 Jul 2008 15:22:24 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 14 Jul 2008 15:21:59 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m6EFLvbS004765 for ; Mon, 14 Jul 2008 11:21:57 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m6EFLuFT006038; Mon, 14 Jul 2008 11:21:56 -0400 Received: from opsy.redhat.com (vpn-10-42.bos.redhat.com [10.16.10.42]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m6EFLuD0021737; Mon, 14 Jul 2008 11:21:56 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 6CCD2378147; Mon, 14 Jul 2008 09:21:55 -0600 (MDT) To: Nick Roberts Cc: gdb-patches@sources.redhat.com Subject: Re: RFA: Patch: annotations -vs- deprecated hooks References: <18554.32994.171402.593716@kahikatea.snap.net.nz> <18554.39826.254742.402462@kahikatea.snap.net.nz> <18554.44449.266149.362665@kahikatea.snap.net.nz> From: Tom Tromey Reply-To: Tom Tromey X-Attribution: Tom Date: Mon, 14 Jul 2008 15:22:00 -0000 In-Reply-To: <18554.44449.266149.362665@kahikatea.snap.net.nz> (Nick Roberts's message of "Mon\, 14 Jul 2008 13\:36\:33 +1200") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2008-07/txt/msg00281.txt.bz2 >>>>> "Nick" == Nick Roberts writes: Nick> In Emacs, variables get marked as obsolete but they are rarely Nick> removed from the code. I think that makes a lot of sense for Emacs, because there are millions of lines of elisp out there, and breaking those randomly would be unfriendly. I don't think this consideration applies to gdb, though. Nick> Creating observers just for breakpoints results in a mixed Nick> approach for annotations as others don't use observers and Nick> removing the deprecated label might encourage their use. Yes. I'm aware of the calls to annotate_* all over gdb, and the strangely named "breakpoints_changed". I have a followup patch to get rid of the latter. I didn't submit it since it causes a test suite regression :). My approach was different from yours in that I tried to piggy-back this on existing observers -- I'm basically trying to avoid adding observers at *every* place we currently have a deprecated hook. Some of those places seem like odd spots for a hook (e.g., breakpoints_changed is called from set_raw_breakpoint, which somehow just seems wrong to me). Anyway, I was not actually planning to look at annotate_*; I'm ambivalent about my breakpoints_changed patch. I mostly wanted to get rid of all the deprecated bits. Nick> http://sourceware.org/ml/gdb-patches/2008-06/msg00000.html Nick> http://sourceware.org/ml/gdb-patches/2008-06/msg00012.html Nick> http://sourceware.org/ml/gdb-patches/2008-06/msg00018.html Oh, sorry about this. I remembered these patches vaguely but didn't realize how much overlap there was with my cleanups. Anything implemented twice like this must be a good idea :-) Tom