From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11463 invoked by alias); 29 Jul 2004 20:02:52 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 11445 invoked from network); 29 Jul 2004 20:02:51 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 29 Jul 2004 20:02:51 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i6TK2pe3027627 for ; Thu, 29 Jul 2004 16:02:51 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i6TK2na28388; Thu, 29 Jul 2004 16:02:49 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 885632B9D; Thu, 29 Jul 2004 16:02:44 -0400 (EDT) Message-ID: <410957E4.3000108@gnu.org> Date: Thu, 29 Jul 2004 20:02:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Jerome Guitton Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] win32: bfd_cache_close after kill References: <20040524115048.GA27758@act-europe.fr> <20040617132031.GA10371@act-europe.fr> <40D1FB3F.3060904@gnu.org> <20040729150357.GA2697@act-europe.fr> In-Reply-To: <20040729150357.GA2697@act-europe.fr> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-07/txt/msg00449.txt.bz2 > Andrew Cagney (cagney@gnu.org): > > >>>>> >>When the inferior is killed, it is safe the release the different file >>>> >>>>>> >>>handles that BFD keeps open. It is particularly useful on Win32 (and >>>>>> >>>presumably on HP UX) to be able to recompile and restart a new debugging >>>>>> >>>session without quitting GDB... >>> >>>> > >>>> > >> >>> Can it now go in the symbol-table reader that opened the file? > > > I finally had time (at last!) to complete the implementation. New patch in > attachment. Still no regression on i686 linux. OK to apply? Just a few tweaks. Assuming there are still no regressions it's ok for mainline. > 2004-07-29 Jerome Guitton > > * inflow.c (kill_command): release file handles in BFD. > * exec.c (exec_file_attach): release exec_bfd file handle. > * symfile.c (symbol_file_add_with_addrs_or_offsets): release > bfd file handle. > * Makefile.in: Update inflow.c's dependencies. > > Index: Makefile.in > =================================================================== > RCS file: /cvs/src/src/gdb/Makefile.in,v > retrieving revision 1.596 > diff -u -p -r1.596 Makefile.in > --- Makefile.in 23 Jul 2004 10:33:36 -0000 1.596 > +++ Makefile.in 29 Jul 2004 13:48:09 -0000 > @@ -1974,7 +1974,7 @@ inf-loop.o: inf-loop.c $(defs_h) $(infer > $(event_top_h) $(inf_loop_h) $(remote_h) > inflow.o: inflow.c $(defs_h) $(frame_h) $(inferior_h) $(command_h) \ > $(serial_h) $(terminal_h) $(target_h) $(gdbthread_h) $(gdb_string_h) \ > - $(inflow_h) > + $(inflow_h) $(bfd_h) "defs.h" includes "bfd.h" so this shouldn't be needed (same for the added #include "bfd.h" further down. > Index: exec.c > =================================================================== > RCS file: /cvs/src/src/gdb/exec.c,v > retrieving revision 1.38 > diff -u -p -r1.38 exec.c > --- exec.c 26 Jul 2004 14:52:59 -0000 1.38 > +++ exec.c 29 Jul 2004 13:48:09 -0000 > @@ -270,6 +270,8 @@ exec_file_attach (char *filename, int fr > if (deprecated_exec_file_display_hook) > (*deprecated_exec_file_display_hook) (filename); > } > + if (exec_bfd) > + bfd_cache_close (exec_bfd); Just call bfd_cache_close_all ()? > } > > /* Process the first arg in ARGS as the new exec file. > Index: inflow.c > =================================================================== > RCS file: /cvs/src/src/gdb/inflow.c,v > retrieving revision 1.22 > diff -u -p -r1.22 inflow.c > --- inflow.c 28 Apr 2004 16:36:25 -0000 1.22 > +++ inflow.c 29 Jul 2004 13:48:09 -0000 > @@ -21,6 +21,7 @@ > Boston, MA 02111-1307, USA. */ > > #include "defs.h" > +#include "bfd.h" See above. Again bfd_cache_close_all()? > + bfd_cache_close (abfd); Andrew