diff options
author | Kevin Buettner <kevinb@redhat.com> | 2002-12-21 05:07:36 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2002-12-21 05:07:36 +0000 |
commit | 96bb4d5a35520c49e0b6027a5534335433071c99 (patch) | |
tree | 458793349b53307e50ec9ace7ad7e720ab781954 /gdb/mips-linux-tdep.c | |
parent | ef7550d5b71c6856a0ce1a715b07416eb2f2b30b (diff) | |
download | gdb-96bb4d5a35520c49e0b6027a5534335433071c99.tar.gz |
Multiarch SVR4_FETCH_LINK_MAP_OFFSETS and GET_LONGJMP_TARGET for GNU/Linux/MIPS.
Diffstat (limited to 'gdb/mips-linux-tdep.c')
-rw-r--r-- | gdb/mips-linux-tdep.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c index 9ad457b0352..3a40670d712 100644 --- a/gdb/mips-linux-tdep.c +++ b/gdb/mips-linux-tdep.c @@ -23,6 +23,8 @@ #include "gdbcore.h" #include "target.h" #include "solib-svr4.h" +#include "osabi.h" +#include "gdb_string.h" /* Copied from <asm/elf.h>. */ #define ELF_NGREG 45 @@ -60,7 +62,10 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; which we extract the pc (MIPS_LINUX_JB_PC) that we will land at. The pc is copied into PC. This routine returns 1 on success. */ -int +#define MIPS_LINUX_JB_ELEMENT_SIZE 4 +#define MIPS_LINUX_JB_PC 0 + +static int mips_linux_get_longjmp_target (CORE_ADDR *pc) { CORE_ADDR jb_addr; @@ -309,7 +314,7 @@ static struct core_fns regset_core_fns = 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). */ -struct link_map_offsets * +static struct link_map_offsets * mips_linux_svr4_fetch_link_map_offsets (void) { static struct link_map_offsets lmo; @@ -342,8 +347,18 @@ mips_linux_svr4_fetch_link_map_offsets (void) return lmp; } +static void +mips_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) +{ + 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); +} + void _initialize_mips_linux_tdep (void) { + gdbarch_register_osabi (bfd_arch_mips, GDB_OSABI_LINUX, + mips_linux_init_abi); add_core_fns (®set_core_fns); } |