This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFA: patch to invalidate dcache in .to_open vector
- To: jtc at redback dot com
- Subject: Re: RFA: patch to invalidate dcache in .to_open vector
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Thu, 10 Aug 2000 11:24:12 -0700
- CC: gdb-patches at sourceware dot cygnus dot com
- References: <5m66paowj1.fsf@jtc.redback.com>
"J.T. Conklin" wrote:
>
> I submit the enclosed patch for approval.
>
> I found that most of .to_open vectors which call dcache_init() do so
> even if the dcache has been created in an earlier call. This leads to
> a dcache-sized memory leak each time the target is opened. Instead,
> the cache should be invalidated ("flushed" using gdb's strange sense
> of the word --- I swear I'm going to change that soon :-).
Yep, thanks.
Andrew
PS: Just an asside for any one curious. As mentioned in the TODO file,
this patch highlights a problem with how GDB opens targets. The target
side does too much. Instead of ``target ...'' calling .to_open()
directly it should call generic GDB code and then that should call
.to_open(). We could then flush these problems. The TODO tries to
explain the required change.
> 2000-08-09 J.T. Conklin <jtc@redback.com>
>
> * monitor.c (monitor_open): If a dcache has already been created,
> invalidate it rather than creating another.
> * ocd.c (ocd_open): Likewise.
> * remote-nindy.c (nindy_open): Likewise.
> * remote-sds.c (sds_open): Likewise.
> * remote-utils.c (gr_open): Likewise.
> * remote.c (remote_open_1, remote_cisco_open): Likewise.