From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20926 invoked by alias); 23 Apr 2004 11:25:12 -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 20863 invoked from network); 23 Apr 2004 11:25:09 -0000 Received: from unknown (HELO miranda.se.axis.com) (212.209.10.220) by sources.redhat.com with SMTP; 23 Apr 2004 11:25:09 -0000 Received: from axis.com (ironmaiden.se.axis.com [10.13.8.120]) by miranda.se.axis.com (8.12.9/8.12.9/Debian-5local0.1) with ESMTP id i3NBP4Um025549; Fri, 23 Apr 2004 13:25:04 +0200 Message-ID: <4088FD0F.7050501@axis.com> Date: Fri, 23 Apr 2004 11:25:00 -0000 From: Orjan Friberg Organization: Axis Communications User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 MIME-Version: 1.0 To: Andrew Cagney 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> <4087D794.10209@gnu.org> In-Reply-To: <4087D794.10209@gnu.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-04/txt/msg00566.txt.bz2 Andrew Cagney wrote: > > 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)). Ok. > There are architectures where registers live in memory so the > information is simply misleading. Ok, I'm convinced. (Thanks for clarifying.) > Eventually, yes. The two can co-habitate for a bit, first just: > > - add the observer Ok. observer.texi gets the following lines added: @deftypefun void target_changed (struct target_ops *@var{current_target}) The target's register contents has changed. @end deftypefun (Proper patch delayed until I've got all the pieces in place.) > - add code to frame.c and regcache.c to register themselves I'm sorry; this is the part I don't get - my skull must be getting really thick. Are you saying that frame.c and regcache.c should register an observer each for the target_changed event, like this (frame.c): void frame_observer_target_changed (struct target_ops *current_target) { flush_cached_frames (); } observer_attach_target_changed (frame_observer_target_changed); and (regcache.c): void regcache_observer_target_changed (struct target_ops *current_target) { registers_changed (); } observer_attach_target_changed (regcache_observer_target_changed); > - add code to the problem area to trigger the observer Ok; something like (example from valops.c): if (deprecated_register_changed_hook) deprecated_register_changed_hook (-1); target_changed_event (); + observer_notify_target_changed (current_target); break; } -- Orjan Friberg Axis Communications