summaryrefslogtreecommitdiff
path: root/gdb/corelow.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@apple.com>1999-04-26 18:34:20 +0000
committerStan Shebs <shebs@apple.com>1999-04-26 18:34:20 +0000
commitfe454715791b86ad488b33c1f325478803c8108c (patch)
tree91ec960676c78ffeab24ee2101fa128d2cc0f958 /gdb/corelow.c
parentf3db0d6e5952e6aa06bdad615829b42d2cf52f71 (diff)
downloadgdb-fe454715791b86ad488b33c1f325478803c8108c.tar.gz
import gdb-19990422 snapshot
Diffstat (limited to 'gdb/corelow.c')
-rw-r--r--gdb/corelow.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/corelow.c b/gdb/corelow.c
index e635257b2f4..0cff0401272 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -95,15 +95,18 @@ core_close (quitting)
{
inferior_pid = 0; /* Avoid confusion from thread stuff */
+ /* Clear out solib state while the bfd is still open. See
+ comments in clear_solib in solib.c. */
+#ifdef CLEAR_SOLIB
+ CLEAR_SOLIB ();
+#endif
+
name = bfd_get_filename (core_bfd);
if (!bfd_close (core_bfd))
warning ("cannot close \"%s\": %s",
name, bfd_errmsg (bfd_get_error ()));
free (name);
core_bfd = NULL;
-#ifdef CLEAR_SOLIB
- CLEAR_SOLIB ();
-#endif
if (core_ops.to_sections)
{
free ((PTR)core_ops.to_sections);