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: RFA: patch to invalidate dcache in .to_open vector


"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.

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