From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Joel Brobecker <brobecker@adacore.com>, Tom Tromey <tromey@redhat.com>
Subject: Re: [patch] release handle on object files after program exits
Date: Wed, 08 Apr 2009 17:14:00 -0000 [thread overview]
Message-ID: <200904081814.46748.pedro@codesourcery.com> (raw)
In-Reply-To: <20090408164839.GD7535@adacore.com>
A Wednesday 08 April 2009 17:48:39, Joel Brobecker wrote:
> Hi Tom,
>
> > Joel> 2009-04-03 Joel Brobecker <brobecker@adacore.com>
> > Joel> * target.c (target_mourn_inferior): Call bfd_cache_close_all.
> >
> > I wonder how this will interact with the multi-process support.
> > It seems like too big a hammer.
>
> I finally had time to look deeper into this - I came up with the patch
> while looking at what we did for the "kill" command, so I didn't have
> to think too much about this.
>
> As far as I can tell, things should still be fine, because the file
> should automatically be re-opened if GDB tries to read from the bfd
> again. Perhaps we could possibly improve the situation, but I propose
> we do that if the current approach becomes an actual problem? (in which
> case we can look at fixing both cases - kill and exit)
>
I'm left wondering if generic_mourn_inferior wouldn't be a better place
for this. That is, at the tail end of mourning, instead of before mourning,
which e.g., has a better change of not triggering a file reopen.
generic_mourn_inferior already calls reopen_exec_file, which
conditionaly calls bfd_cache_close_all.
--
Pedro Alves
next prev parent reply other threads:[~2009-04-08 17:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-03 16:44 Joel Brobecker
2009-04-03 18:41 ` Tom Tromey
2009-04-08 16:48 ` Joel Brobecker
2009-04-08 17:14 ` Pedro Alves [this message]
2009-04-08 22:51 ` Joel Brobecker
2009-04-08 23:12 ` Pedro Alves
2009-04-14 16:51 ` Joel Brobecker
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=200904081814.46748.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
/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