aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/solib-aix.c10
-rw-r--r--gdb/solib-target.c8
-rw-r--r--gdb/solib.c6
3 files changed, 6 insertions, 18 deletions
diff --git a/gdb/solib-aix.c b/gdb/solib-aix.c
index fd6b1e7..0b6ad83 100644
--- a/gdb/solib-aix.c
+++ b/gdb/solib-aix.c
@@ -373,14 +373,6 @@ solib_aix_free_so (struct so_list *so)
delete li;
}
-/* Implement the "clear_solib" target_so_ops method. */
-
-static void
-solib_aix_clear_solib (void)
-{
- /* Nothing needed. */
-}
-
/* Compute and return the OBJFILE's section_offset array, using
the associated loader info (INFO). */
@@ -715,7 +707,7 @@ const struct target_so_ops solib_aix_so_ops =
solib_aix_relocate_section_addresses,
solib_aix_free_so,
nullptr,
- solib_aix_clear_solib,
+ nullptr,
solib_aix_solib_create_inferior_hook,
solib_aix_current_sos,
solib_aix_open_symbol_file_object,
diff --git a/gdb/solib-target.c b/gdb/solib-target.c
index ca9478f..865235d 100644
--- a/gdb/solib-target.c
+++ b/gdb/solib-target.c
@@ -282,12 +282,6 @@ solib_target_solib_create_inferior_hook (int from_tty)
}
static void
-solib_target_clear_solib (void)
-{
- /* Nothing needed. */
-}
-
-static void
solib_target_free_so (struct so_list *so)
{
lm_info_target *li = (lm_info_target *) so->lm_info;
@@ -440,7 +434,7 @@ const struct target_so_ops solib_target_so_ops =
solib_target_relocate_section_addresses,
solib_target_free_so,
nullptr,
- solib_target_clear_solib,
+ nullptr,
solib_target_solib_create_inferior_hook,
solib_target_current_sos,
solib_target_open_symbol_file_object,
diff --git a/gdb/solib.c b/gdb/solib.c
index a2a8a03..e821181 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -1240,7 +1240,8 @@ clear_solib (void)
free_so (so);
}
- ops->clear_solib ();
+ if (ops->clear_solib != nullptr)
+ ops->clear_solib ();
}
/* Shared library startup support. When GDB starts up the inferior,
@@ -1409,7 +1410,8 @@ reload_shared_libraries (const char *ignored, int from_tty,
{
/* Reset or free private data structures not associated with
so_list entries. */
- ops->clear_solib ();
+ if (ops->clear_solib != nullptr)
+ ops->clear_solib ();
/* Remove any previous solib event breakpoint. This is usually
done in common code, at breakpoint_init_inferior time, but