Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: gdb-patches@sourceware.org
Cc: Daniel Jacobowitz <drow@false.org>
Subject: Re: [RFC] Entry point update with "run" command
Date: Sun, 04 May 2008 15:23:00 -0000	[thread overview]
Message-ID: <20080504143614.GA419@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <20080502154447.GR29202@caradoc.them.org>

[-- Attachment #1: Type: text/plain, Size: 572 bytes --]

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

[-- Attachment #2: bfd-reread.patch --]
[-- Type: text/plain, Size: 992 bytes --]

2008-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* 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.  */

  reply	other threads:[~2008-05-04 14:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-24 16:45 Luis Machado
2008-04-26 13:42 ` Jan Kratochvil
2008-05-01 16:19   ` Luis Machado
2008-05-02 15:46   ` Daniel Jacobowitz
2008-05-04 15:23     ` Jan Kratochvil [this message]
2008-05-02 15:45 ` Daniel Jacobowitz
2008-05-05 19:17   ` Luis Machado

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080504143614.GA419@host0.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox