From: Andrew Cagney <cagney@gnu.org>
To: Orjan Friberg <orjan.friberg@axis.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: Multiplexed registers and invalidating the register cache
Date: Thu, 22 Apr 2004 14:33:00 -0000 [thread overview]
Message-ID: <4087D794.10209@gnu.org> (raw)
In-Reply-To: <4087CF61.4030109@axis.com>
> 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
next prev parent reply other threads:[~2004-04-22 14:33 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-14 11:44 Orjan Friberg
2004-04-14 14:46 ` Daniel Jacobowitz
2004-04-14 16:01 ` Andrew Cagney
2004-04-15 10:46 ` Orjan Friberg
2004-04-15 11:25 ` Orjan Friberg
2004-04-15 15:29 ` Andrew Cagney
2004-04-16 12:51 ` Orjan Friberg
2004-04-16 14:13 ` Daniel Jacobowitz
2004-04-16 14:54 ` Orjan Friberg
2004-04-16 19:15 ` Andrew Cagney
2004-04-19 14:13 ` Orjan Friberg
2004-04-21 16:48 ` Andrew Cagney
2004-04-22 13:58 ` Orjan Friberg
2004-04-22 14:33 ` Andrew Cagney [this message]
2004-04-23 11:25 ` Orjan Friberg
2004-04-24 0:03 ` Andrew Cagney
2004-04-23 15:20 ` Orjan Friberg
2004-04-23 17:58 ` Eli Zaretskii
2004-04-26 9:41 ` Orjan Friberg
2004-04-24 0:03 ` Andrew Cagney
2004-04-24 8:30 ` Eli Zaretskii
2004-04-28 16:43 ` Andrew Cagney
2004-04-28 17:40 ` Eli Zaretskii
2004-04-29 8:09 ` Orjan Friberg
2004-04-29 17:56 ` Eli Zaretskii
2004-04-30 7:39 ` Orjan Friberg
2004-04-26 9:50 ` Orjan Friberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4087D794.10209@gnu.org \
--to=cagney@gnu.org \
--cc=gdb-patches@sources.redhat.com \
--cc=orjan.friberg@axis.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox