Register Cache.
Fernando Nasser
fnasser@redhat.com
Thu Mar 29 16:27:00 GMT 2001
Steven Johnson wrote:
>
> Fernando Nasser wrote:
> > However, I vaguely remember our register cache being a
> > "write-through" cache.
>
> It is, unless the data you are writing is already believed to be in the
> register.
>
> ie, Register contains 0xAA55
>
> Write 0x55AA to Register, and GDB updates target register with 0x55AA
>
> Write 0x55AA to Register again, and GDB checks it's cache, determines
> the value is already 0x55AA and does NOT write.
>
That is true. I forgot this little detail.
> I have gotten around the issues by invalidating the register cache
> between writes. This is obviously sub-optimal but it works OK.
>
> A better implementation would be to allow a setting on a register by
> register basis that sets how it will be cached by reg-cache. At the
> time of the original post, this was a fairly major undertaking.
> Regcache currently seems to be undergoing changes that will make
> implementing this easier but for the moment flushing works fine.
>
Yes, like "not cached" :-) For hardware/control registers caching is
just not good.
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
More information about the Gdb
mailing list