From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4741 invoked by alias); 17 Jun 2004 12:21:28 -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 4732 invoked from network); 17 Jun 2004 12:21:27 -0000 Received: from unknown (HELO dublin.act-europe.fr) (212.157.227.154) by sourceware.org with SMTP; 17 Jun 2004 12:21:27 -0000 Received: from localhost (province.act-europe.fr [10.10.0.214]) by filtered-dublin.act-europe.fr (Postfix) with ESMTP id D0D18229F14 for ; Thu, 17 Jun 2004 14:20:31 +0200 (MET DST) Received: from dublin.act-europe.fr ([10.10.0.154]) by localhost (province.act-europe.fr [10.10.0.214]) (amavisd-new, port 10024) with ESMTP id 64264-06 for ; Thu, 17 Jun 2004 14:20:31 +0200 (CEST) Received: from berne.act-europe.fr (berne.act-europe.fr [10.10.0.165]) by dublin.act-europe.fr (Postfix) with ESMTP id 7F6E7229E63 for ; Thu, 17 Jun 2004 14:20:31 +0200 (MET DST) Received: by berne.act-europe.fr (Postfix, from userid 560) id 717F2592B; Thu, 17 Jun 2004 09:20:31 -0400 (EDT) Date: Thu, 17 Jun 2004 12:21:00 -0000 From: Jerome Guitton To: gdb-patches@sources.redhat.com Subject: Re: [RFA] win32: bfd_cache_close after kill Message-ID: <20040617132031.GA10371@act-europe.fr> References: <20040524115048.GA27758@act-europe.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="45Z9DzgjV8m4Oswq" Content-Disposition: inline In-Reply-To: <20040524115048.GA27758@act-europe.fr> User-Agent: Mutt/1.4i X-Virus-Scanned: by amavisd-new at act-europe.fr X-SW-Source: 2004-06/txt/msg00411.txt.bz2 --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 356 > 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... New implementation, using bfd_cache_close_all. No regression on i686 linux. OK to apply? -- Jerome --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="inflow.c.dif" Content-length: 1563 2004-06-17 Jerome Guitton * inflow.c (kill_command): release file handles in BFD. * Makefile.in: Update inflow.c's dependencies. 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 17 Jun 2004 12:16:08 -0000 @@ -21,6 +21,7 @@ Boston, MA 02111-1307, USA. */ #include "defs.h" +#include "bfd.h" #include "frame.h" #include "inferior.h" #include "command.h" @@ -597,6 +598,8 @@ kill_command (char *arg, int from_tty) else print_stack_frame (get_selected_frame (), 1, SRC_AND_LOC); } + + bfd_cache_close_all (); } /* Call set_sigint_trap when you need to pass a signal on to an attached Index: Makefile.in =================================================================== RCS file: /cvs/src/src/gdb/Makefile.in,v retrieving revision 1.587 diff -u -p -r1.587 Makefile.in --- Makefile.in 14 Jun 2004 20:40:39 -0000 1.587 +++ Makefile.in 17 Jun 2004 12:16:08 -0000 @@ -1964,7 +1964,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) infptrace.o: infptrace.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ $(gdb_string_h) $(regcache_h) $(gdb_wait_h) $(command_h) \ $(gdb_dirent_h) $(gdbcore_h) $(gdb_stat_h) --45Z9DzgjV8m4Oswq--