This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH]: New maintainer command "flushregs"


Andrew Cagney wrote:
> 
> Michael Snyder wrote:
> >
> > I added this to help with testing register fetch and store.
> >
> > 2000-09-01  Michael Snyder  <msnyder@cleaver.cygnus.com>
> >
> >         * regcache.c (reg_flush_command): New function.  Maintainer-mode
> >         command, flushes GDB's register cache, for testing purposes.
> 
> Could I suggest something like ``maint flush registers'' so that ``maint
> flush cache'' is also available (or ``maint registers flush'' if you
> want to turn it around :-).
> 

Furthermore, the command is not flushing the cache.  It is "invalidating it".
Flush the cache would mean that all things that have been changed would be written
back as well.

Of course we implement a write through cache, so we have nothing to write.  But IMO we
should keep the name consistent.  reg_cache_invalidate_command() and "invregcache"
would be more accurate.

But the command is useful and I would like to call the function from a "hreset" command
I have to implement.

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@cygnus.com
2323 Yonge Street, Suite #300           Tel:  416-482-2661 ext. 311
Toronto, Ontario   M4P 2C9              Fax:  416-482-6299

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]