This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Multiplexed registers and invalidating the register cache
- From: Orjan Friberg <orjan dot friberg at axis dot com>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Thu, 15 Apr 2004 12:46:02 +0200
- Subject: Re: Multiplexed registers and invalidating the register cache
- Organization: Axis Communications
- References: <407D242B.109@axis.com> <20040414144607.GA5700@nevyn.them.org>
Daniel Jacobowitz wrote:
I think you should make this change unconditionally - and flush the
entire frame cache.
Pardon my ignorance, but why should the entire frame cache be flushed,
instead of just invalidating the current set of registers? Is it
because frame pointer/return address registers (or something else
affecting other frames) might change?
I'm not sure whether it should be in the generic
code that writes a register or the user-level code triggered by set
$reg = val, though.
So either something like
target_register_write (regno)
where the target-specific code can do whatever it wants (presumably
calling flush_cached_frames), or a more specialized function
target_flush_register_cache_on_register_write (regno)
and then have whatever calls that function do the actual frame cache
flushing.
Andrew convinced me that the performance cost associated with this
would be small in practice.
So, it's not worth the trouble implementing a more fine-grained solution
like "refetch only the modified register".
--
Orjan Friberg
Axis Communications