From 15a1b8bebfeefbbf3aef3b138ee6ed63860b9af6 Mon Sep 17 00:00:00 2001 From: Kevin Buettner Date: Thu, 27 Sep 2001 05:03:08 +0000 Subject: [PATCH] From Ilya Golubev : * solib.c (clear_solib): Call `remove_target_sections' to fix stale pointers in `struct target_ops'. * irix5-nat.c (clear_solib): Likewise. * osfsolib.c (clear_solib): Likewise. --- gdb/ChangeLog | 8 ++++++++ gdb/irix5-nat.c | 1 + gdb/osfsolib.c | 1 + gdb/solib.c | 2 ++ 4 files changed, 12 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 60f17cb4215..41bc8de148e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2001-09-26 Kevin Buettner + + From Ilya Golubev : + * solib.c (clear_solib): Call `remove_target_sections' to fix + stale pointers in `struct target_ops'. + * irix5-nat.c (clear_solib): Likewise. + * osfsolib.c (clear_solib): Likewise. + 2001-09-26 Andrew Cagney * CONTRIBUTE: Update. diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c index c1549fc0623..3c3284047cc 100644 --- a/gdb/irix5-nat.c +++ b/gdb/irix5-nat.c @@ -1061,6 +1061,7 @@ clear_solib (void) } if (so_list_head->abfd) { + remove_target_sections (so_list_head->abfd); bfd_filename = bfd_get_filename (so_list_head->abfd); if (!bfd_close (so_list_head->abfd)) warning ("cannot close \"%s\": %s", diff --git a/gdb/osfsolib.c b/gdb/osfsolib.c index b5a61518bc1..734cbc23ab5 100644 --- a/gdb/osfsolib.c +++ b/gdb/osfsolib.c @@ -802,6 +802,7 @@ clear_solib (void) } if (so_list_head->abfd) { + remove_target_sections (so_list_head->abfd); bfd_filename = bfd_get_filename (so_list_head->abfd); if (!bfd_close (so_list_head->abfd)) warning ("cannot close \"%s\": %s", diff --git a/gdb/solib.c b/gdb/solib.c index dfcca0cc47b..c43858e8b55 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -730,6 +730,8 @@ clear_solib (void) { struct so_list *so = so_list_head; so_list_head = so->next; + if (so->abfd) + remove_target_sections (so->abfd); free_so (so); } -- 2.47.3