From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26286 invoked by alias); 22 Apr 2004 14:33:02 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 26241 invoked from network); 22 Apr 2004 14:33:00 -0000 Received: from unknown (HELO localhost.redhat.com) (24.157.170.238) by sources.redhat.com with SMTP; 22 Apr 2004 14:33:00 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 9DF7C2BA1; Thu, 22 Apr 2004 10:32:52 -0400 (EDT) Message-ID: <4087D794.10209@gnu.org> Date: Thu, 22 Apr 2004 14:33:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Orjan Friberg Cc: gdb-patches@sources.redhat.com Subject: Re: Multiplexed registers and invalidating the register cache References: <407D242B.109@axis.com> <20040414144607.GA5700@nevyn.them.org> <407E67EA.80701@axis.com> <407E70FD.7060709@axis.com> <407EAA4B.7000500@gnu.org> <407FD693.2080804@axis.com> <408030DB.3080708@gnu.org> <4083DE9C.7000208@axis.com> <40869FC4.2090407@gnu.org> <4087CF61.4030109@axis.com> In-Reply-To: <4087CF61.4030109@axis.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-04/txt/msg00520.txt.bz2 > Andrew Cagney wrote: > >> >> Simpler, "target_changed" - no parameters. > > > Hm. observer.texi says "all events must take at least one parameter", but having an event without a parameter worked fine. I assumed observer.sh would yell at me, but it didn't ;) . Oops, yes, pass the current_target (I ment that it shouldn't have a parameter trying to tell the observers anything beyond the fact that the target has changed). (the sed script generates () instead of (void)). > But wouldn't it make sense to have the register number parameter, and based on that determine (in target-specific code) whether to flush the frame cache and registers? Or was that part of the cost discussion between you and Daniel, and what you're saying is that "whenever *any* register is changed in *any* target, flush the frame and register cache"? There are architectures where registers live in memory so the information is simply misleading. >> The core code, after doing the write, should trigger this event ... >> >>> In addition, someone needs to notify that the event has happened, but I assume these notifications should be inserted at the same places that register_changed_hook is called for GUI purposes. >> >> >> >> ... [yes] replacing registers changed. > > > ... meaning all calls to registers_changed should be changed into calls to observer_notify_target_changed? Eventually, yes. The two can co-habitate for a bit, first just: - add the observer - add code to frame.c and regcache.c to register themselves - add code to the problem area to trigger the observer > Also, if the observer should a generic > > void > observer_target_changed (void) > { > registers_changed (); > flush_cached_frames (); > } > > instead of target-specific one (I couldn't infer that from your answer), where should it go? sorry, I'm lost Andrew