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/mips-linux-tdep.c | 94 +++------------------------------------------------ 1 file changed, 5 insertions(+), 89 deletions(-) (limited to 'gdb/mips-linux-tdep.c') diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c index 9ce4717..021edc7 100644 --- a/gdb/mips-linux-tdep.c +++ b/gdb/mips-linux-tdep.c @@ -1,6 +1,7 @@ /* Target-dependent code for GNU/Linux on MIPS processors. - Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2004, 2005, 2006 + Free Software Foundation, Inc. This file is part of GDB. @@ -280,49 +281,6 @@ mips_linux_register_addr (int regno, CORE_ADDR blockend) return regaddr; } - -/* Fetch (and possibly build) an appropriate link_map_offsets - structure for native GNU/Linux MIPS targets using the struct - offsets defined in link.h (but without actual reference to that - file). - - This makes it possible to access GNU/Linux MIPS shared libraries - from a GDB that was built on a different host platform (for cross - debugging). */ - -static struct link_map_offsets * -mips_linux_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; /* The actual size is 20 bytes, but - this is all we need. */ - 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; -} - /* Support for 64-bit ABIs. */ /* Copied from . */ @@ -632,48 +590,6 @@ static struct core_fns regset_core_fns = NULL /* next */ }; -/* Fetch (and possibly build) an appropriate link_map_offsets - structure for native GNU/Linux MIPS targets using the struct - offsets defined in link.h (but without actual reference to that - file). - - This makes it possible to access GNU/Linux MIPS shared libraries - from a GDB that was built on a different host platform (for cross - debugging). */ - -static struct link_map_offsets * -mips64_linux_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; /* The actual size is 40 bytes, but - this is all we need. */ - lmo.r_map_offset = 8; - lmo.r_map_size = 8; - - lmo.link_map_size = 40; - - 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; -} - /* Handle for obtaining pointer to the current register_addr() function for a given architecture. */ static struct gdbarch_data *register_addr_data; @@ -1183,7 +1099,7 @@ mips_linux_init_abi (struct gdbarch_info info, set_gdbarch_get_longjmp_target (gdbarch, mips_linux_get_longjmp_target); set_solib_svr4_fetch_link_map_offsets - (gdbarch, mips_linux_svr4_fetch_link_map_offsets); + (gdbarch, svr4_ilp32_fetch_link_map_offsets); set_mips_linux_register_addr (gdbarch, mips_linux_register_addr); tramp_frame_prepend_unwinder (gdbarch, &mips_linux_o32_sigframe); tramp_frame_prepend_unwinder (gdbarch, &mips_linux_o32_rt_sigframe); @@ -1192,7 +1108,7 @@ mips_linux_init_abi (struct gdbarch_info info, set_gdbarch_get_longjmp_target (gdbarch, mips_linux_get_longjmp_target); set_solib_svr4_fetch_link_map_offsets - (gdbarch, mips_linux_svr4_fetch_link_map_offsets); + (gdbarch, svr4_ilp32_fetch_link_map_offsets); set_mips_linux_register_addr (gdbarch, mips64_linux_register_addr); tramp_frame_prepend_unwinder (gdbarch, &mips_linux_n32_rt_sigframe); break; @@ -1200,7 +1116,7 @@ mips_linux_init_abi (struct gdbarch_info info, set_gdbarch_get_longjmp_target (gdbarch, mips64_linux_get_longjmp_target); set_solib_svr4_fetch_link_map_offsets - (gdbarch, mips64_linux_svr4_fetch_link_map_offsets); + (gdbarch, svr4_lp64_fetch_link_map_offsets); set_mips_linux_register_addr (gdbarch, mips64_linux_register_addr); tramp_frame_prepend_unwinder (gdbarch, &mips_linux_n64_rt_sigframe); break; -- cgit v1.1