Two solib ops implementations have dummy implementations for the
in_dynsym_resolve_code callback. Make it optional, to avoid this.
Change-Id: I786776fb82ce1b96335a97713fbfe8074c84c00c
Reviewed-By: Guinevere Larsen <guinevere@redhat.com>
return sos;
}
-/* Implement the "in_dynsym_resolve_code" solib_ops method. */
-
-static bool
-solib_aix_in_dynsym_resolve_code (CORE_ADDR pc)
-{
- return false;
-}
-
/* Implement the "bfd_open" solib_ops method. */
static gdb_bfd_ref_ptr
solib_aix_solib_create_inferior_hook,
solib_aix_current_sos,
nullptr,
- solib_aix_in_dynsym_resolve_code,
+ nullptr,
solib_aix_bfd_open,
nullptr,
nullptr,
return darwin_validate_exec_header (load_addr);
}
-/* Return true if PC lies in the dynamic symbol resolution code of the
- run time loader. */
-
-static bool
-darwin_in_dynsym_resolve_code (CORE_ADDR pc)
-{
- return false;
-}
-
/* A wrapper for bfd_mach_o_fat_extract that handles reference
counting properly. This will either return NULL, or return a new
reference to a BFD. */
darwin_solib_create_inferior_hook,
darwin_current_sos,
nullptr,
- darwin_in_dynsym_resolve_code,
+ nullptr,
darwin_bfd_open,
nullptr,
nullptr,
bool
in_solib_dynsym_resolve_code (CORE_ADDR pc)
{
- return (gdbarch_so_ops (current_inferior ()->arch ())
- ->in_dynsym_resolve_code (pc));
+ const auto in_dynsym_resolve_code
+ = gdbarch_so_ops (current_inferior ()->arch ())->in_dynsym_resolve_code;
+
+ return in_dynsym_resolve_code && in_dynsym_resolve_code (pc);
}
/* Implements the "sharedlibrary" command. */