From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17999 invoked by alias); 4 May 2008 14:36:47 -0000 Received: (qmail 17990 invoked by uid 22791); 4 May 2008 14:36:46 -0000 X-Spam-Check-By: sourceware.org Received: from host0.dyn.jankratochvil.net (HELO host0.dyn.jankratochvil.net) (89.250.240.59) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 04 May 2008 14:36:21 +0000 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.2/8.14.2) with ESMTP id m44EaFni000591; Sun, 4 May 2008 16:36:15 +0200 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.2/8.14.2/Submit) id m44EaEaw000590; Sun, 4 May 2008 16:36:14 +0200 Date: Sun, 04 May 2008 15:23:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Cc: Daniel Jacobowitz Subject: Re: [RFC] Entry point update with "run" command Message-ID: <20080504143614.GA419@host0.dyn.jankratochvil.net> References: <1209052694.18229.6.camel@gargoyle.br.ibm.com> <20080426132225.GA16017@host0.dyn.jankratochvil.net> <20080502154447.GR29202@caradoc.them.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="jRHKVT23PllUwdXP" Content-Disposition: inline In-Reply-To: <20080502154447.GR29202@caradoc.them.org> User-Agent: Mutt/1.5.17 (2007-11-01) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-05/txt/msg00171.txt.bz2 --jRHKVT23PllUwdXP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 572 On Fri, 02 May 2008 17:44:47 +0200, Daniel Jacobowitz wrote: > On Sat, Apr 26, 2008 at 03:22:25PM +0200, Jan Kratochvil wrote: > > There is a problem whole EXEC_BFD becomes stale - using the more general > > attached patch. > > Does this work if you just call exec_file_attach instead of > exec_ops.to_open? The difference is target_preopen which I do not > believe we want here. Thanks, it works (I was tryint to use exec_file_command instead before). > If that works, it's OK to commit. Committed, no regressions on native x86_64-unknown-linux-gnu. Regards, Jan --jRHKVT23PllUwdXP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="bfd-reread.patch" Content-length: 992 2008-05-04 Jan Kratochvil * symfile.c (reread_symbols): Reload EXEC_BFD on its change. =================================================================== RCS file: /cvs/src/src/gdb/symfile.c,v retrieving revision 1.201 retrieving revision 1.202 diff -u -r1.201 -r1.202 --- src/gdb/symfile.c 2008/05/04 03:45:42 1.201 +++ src/gdb/symfile.c 2008/05/04 14:34:06 1.202 @@ -2331,6 +2331,14 @@ /* We need to do this whenever any symbols go away. */ make_cleanup (clear_symtab_users_cleanup, 0 /*ignore*/); + if (exec_bfd != NULL && strcmp (bfd_get_filename (objfile->obfd), + bfd_get_filename (exec_bfd)) == 0) + { + /* Reload EXEC_BFD without asking anything. */ + + exec_file_attach (bfd_get_filename (objfile->obfd), 0); + } + /* Clean up any state BFD has sitting around. We don't need to close the descriptor but BFD lacks a way of closing the BFD without closing the descriptor. */ --jRHKVT23PllUwdXP--