From 76a9d10f5261cea3442e1b9e7239f1eef27959a8 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sun, 15 Jan 2006 18:28:58 +0000 Subject: * arm-linux-tdep.c (arm_linux_svr4_fetch_link_map_offsets): Remove. (arm_linux_init_abi): Set solib_svr4_fetch_link_map_offsets to svr4_ilp32_fetch_link_map_offsets. * cris-tdep.c (cris_linux_svr4_fetch_link_map_offsets): Remove function. (cris_gdbarch_init): Set solib_svr4_fetch_link_map_offsets to svr4_ilp32_fetch_link_map_offsets. * mips-linux-tdep.c (mips_linux_svr4_fetch_link_map_offsets) (mips64_linux_svr4_fetch_link_map_offsets): Remove functions. (mips_linux_init_abi): Set solib_svr4_fetch_link_map_offsets to svr4_ilp32_fetch_link_map_offsets or svr4_lp64_fetch_link_map_offsets where appropriate. * nbsd-tdep.c (nbsd_ilp32_solib_svr4_fetch_link_map_offsets): Simply call svr4_ilp32_fetch_link_map_offsets. (nbsd_lp64_solib_svr4_fetch_link_map_offsets): Simply call svr4_lp64_fetch_link_map_offsets. * ppc-linux-tdep.c (ppc_linux_svr4_fetch_link_map_offsets): Remove function. (ppc_linux_init_abi): Set solib_svr4_fetch_link_map_offsets to svr4_ilp32_fetch_link_map_offsets. * s390-tdep.c (s390_svr4_fetch_link_map_offsets) (s390x_svr4_fetch_link_map_offsets): Remove functions. (s390_gdbarch_init): Set solib_svr4_fetch_link_map_offsets to svr4_ilp32_fetch_link_map_offsets or svr4_lp64_fetch_link_map_offsets where appropriate. --- gdb/s390-tdep.c | 80 ++++----------------------------------------------------- 1 file changed, 5 insertions(+), 75 deletions(-) (limited to 'gdb/s390-tdep.c') diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index b5a92ca..dddef7a 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -43,7 +43,7 @@ #include "value.h" #include "gdb_assert.h" #include "dis-asm.h" -#include "solib-svr4.h" /* For struct link_map_offsets. */ +#include "solib-svr4.h" #include "s390-tdep.h" @@ -2864,76 +2864,6 @@ s390_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name return 0; } - -/* Link map offsets. */ - -static struct link_map_offsets * -s390_svr4_fetch_link_map_offsets (void) -{ - static struct link_map_offsets lmo; - static struct link_map_offsets *lmp = NULL; - - if (lmp == NULL) - { - lmp = &lmo; - - lmo.r_debug_size = 8; - - lmo.r_map_offset = 4; - lmo.r_map_size = 4; - - lmo.link_map_size = 20; - - lmo.l_addr_offset = 0; - lmo.l_addr_size = 4; - - lmo.l_name_offset = 4; - lmo.l_name_size = 4; - - lmo.l_next_offset = 12; - lmo.l_next_size = 4; - - lmo.l_prev_offset = 16; - lmo.l_prev_size = 4; - } - - return lmp; -} - -static struct link_map_offsets * -s390x_svr4_fetch_link_map_offsets (void) -{ - static struct link_map_offsets lmo; - static struct link_map_offsets *lmp = NULL; - - if (lmp == NULL) - { - lmp = &lmo; - - lmo.r_debug_size = 16; /* All we need. */ - - lmo.r_map_offset = 8; - lmo.r_map_size = 8; - - lmo.link_map_size = 40; /* All we need. */ - - lmo.l_addr_offset = 0; - lmo.l_addr_size = 8; - - lmo.l_name_offset = 8; - lmo.l_name_size = 8; - - lmo.l_next_offset = 24; - lmo.l_next_size = 8; - - lmo.l_prev_offset = 32; - lmo.l_prev_size = 8; - } - - return lmp; -} - - /* Set up gdbarch struct. */ static struct gdbarch * @@ -3015,8 +2945,8 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_addr_bits_remove (gdbarch, s390_addr_bits_remove); set_gdbarch_pseudo_register_read (gdbarch, s390_pseudo_register_read); set_gdbarch_pseudo_register_write (gdbarch, s390_pseudo_register_write); - set_solib_svr4_fetch_link_map_offsets (gdbarch, - s390_svr4_fetch_link_map_offsets); + set_solib_svr4_fetch_link_map_offsets + (gdbarch, svr4_ilp32_fetch_link_map_offsets); break; case bfd_mach_s390_64: @@ -3032,8 +2962,8 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_ptr_bit (gdbarch, 64); set_gdbarch_pseudo_register_read (gdbarch, s390x_pseudo_register_read); set_gdbarch_pseudo_register_write (gdbarch, s390x_pseudo_register_write); - set_solib_svr4_fetch_link_map_offsets (gdbarch, - s390x_svr4_fetch_link_map_offsets); + set_solib_svr4_fetch_link_map_offsets + (gdbarch, svr4_lp64_fetch_link_map_offsets); set_gdbarch_address_class_type_flags (gdbarch, s390_address_class_type_flags); set_gdbarch_address_class_type_flags_to_name (gdbarch, -- cgit v1.1