From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117750 invoked by alias); 26 Mar 2015 12:50:20 -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 117735 invoked by uid 89); 26 Mar 2015 12:50:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-wi0-f170.google.com Received: from mail-wi0-f170.google.com (HELO mail-wi0-f170.google.com) (209.85.212.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 26 Mar 2015 12:50:18 +0000 Received: by wibg7 with SMTP id g7so147219453wib.1 for ; Thu, 26 Mar 2015 05:50:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=LHlFrczmexgLjemmJvA2Y0PG/BHeH0RIZblTOynrWrw=; b=JFjb78EB3nwrY1WCeXZOJQmfIJRAyFBD7sHe4IhFWQrU7OkiAXe1C1EeSaLHxrUKnq yfk8TfMSXBxiFvBwKFIKzFS85KO3zEkvaHROUxb1x5cS15wHu5/TAaX9MySQhztOJkw2 dcUaqsFR+GNDcMRCdibZm3RPoGKbR18CtAh+NZqqLo2IiaV+ByPdF6/YxHtT4DA/Iw6S 6OWG3VbCNmFBkUSQ/rBLk48Onossh7rHIr9DuchBciHxqsvN1H+H1gU2lHP9Iz1jx9EQ KYmdLPGtLNXW0eoQE6PsquM92xXCXv2DVpcB/M/eKoGbugdNJdDjq31rBdhwHt8x6TFe Wimw== X-Gm-Message-State: ALoCoQkcYfLMm/O78UTeqeSnNhsviMuLQ7HJjcGeDnMDsqvGrL3/bq66hatvQBBpwtZUOOR6Yug9 X-Received: by 10.194.9.98 with SMTP id y2mr28358961wja.85.1427374215399; Thu, 26 Mar 2015 05:50:15 -0700 (PDT) Received: from localhost (host86-142-42-143.range86-142.btcentralplus.com. [86.142.42.143]) by mx.google.com with ESMTPSA id fm10sm8849682wib.7.2015.03.26.05.50.14 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Mar 2015 05:50:14 -0700 (PDT) Date: Thu, 26 Mar 2015 12:50:00 -0000 From: Andrew Burgess To: Pedro Alves , Doug Evans Cc: gdb-patches Subject: Re: [PATCH] gdb: New frame_cache_cleared observer. Message-ID: <20150326125012.GB11596@embecosm.com> References: <1427303468-17834-1-git-send-email-andrew.burgess@embecosm.com> <5513D04B.1070602@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5513D04B.1070602@redhat.com> X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00852.txt.bz2 Doug, Pedro, * Pedro Alves [2015-03-26 09:24:27 +0000]: > On 03/25/2015 11:18 PM, Doug Evans wrote: > > On Wed, Mar 25, 2015 at 10:11 AM, Andrew Burgess > > wrote: > >> This adds a new observer for the frame cache cleared event. > >> > >> While working on a new gdb port I found that I wanted to cache machine > >> state that was gathered as part of the register read process. The > >> most appropriate time to discard this cached information is when the > >> frame cache is flushed. > >> > >> However, as I don't have an actual use for this observer that I can > >> post upstream (yet) I don't know if this will be acceptable, but given > >> it's a fairly small change I thought I'd try. > Right. We delete dead code all the time. So it's better to wait until > is has a use, because otherwise someone could well end up stumbling on it, > noticing it has no uses and decides to send a patch that garbage > collects it. Thanks for looking at my patch, and I understand why you've rejected it for now. I do have one followup: as far as I can tell the observers register_changed, inferior_call_pre, and inferior_call_post are only used by the python bindings to make the events available in python. As far as I can tell[1] these event bindings are only used within the test suite. ... and a question: If I made frame_cache_cleared a python accessible event, and added a test would this be sufficient to keep the code alive? Thanks for your time, Andrew [1] I could easily be wrong!