aboutsummaryrefslogtreecommitdiff
path: root/gdb/alpha-nat.c
diff options
context:
space:
mode:
authorJason Thorpe <thorpej@netbsd.org>2002-04-26 01:08:19 +0000
committerJason Thorpe <thorpej@netbsd.org>2002-04-26 01:08:19 +0000
commitaccc6d1ff368635135fb961397da748a4505008c (patch)
tree9e67a682a1462c55bb84208a36c39a7b38d9d03a /gdb/alpha-nat.c
parentd5ba2a0169386af2ecd2e678876297ee4bee61da (diff)
downloadgdb-accc6d1ff368635135fb961397da748a4505008c.zip
gdb-accc6d1ff368635135fb961397da748a4505008c.tar.gz
gdb-accc6d1ff368635135fb961397da748a4505008c.tar.bz2
* alpha-tdep.h (gdbarch_tdep): Add jb_pc and jb_elt_size members.
* alpha-linux-tdep.c (alpha_linux_init_abi): Initialize tdep->jb_pc and tdep->jb_elt_size. * alpha-osf1-tdep.c (alpha_osf1_init_abi): Likewise. * alphafbsd-tdep.c (alphafbsd_init_abi): Likewise. * alphanbsd-tdep.c (alphanbsd_init_abi): Likewise. * alpha-nat.c (get_longjmp_target): Remove. (JB_ELEMENT_SIZE): Ditto. (JB_PC): Ditto. * alpha-tdep.c (alpha_get_longjmp_target): New function. (alpha_gdbarch_init): Default tdep->jb_pc to -1. If the OS ABI sets jb_pc to a valid value, set gdbarch_get_longjmp_target to alpha_get_longjmp_target. (alpha_dump_tdep): Report tdep->jb_pc and tdep->jb_elt_size. * config/alpha/nm-linux.h (GET_LONGJMP_TARGET): Remove. * config/alpha/nm-osf.h (GET_LONGJMP_TARGET): Remove.
Diffstat (limited to 'gdb/alpha-nat.c')
-rw-r--r--gdb/alpha-nat.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/gdb/alpha-nat.c b/gdb/alpha-nat.c
index a21346b..580dcc0 100644
--- a/gdb/alpha-nat.c
+++ b/gdb/alpha-nat.c
@@ -41,40 +41,6 @@
static void fetch_osf_core_registers (char *, unsigned, int, CORE_ADDR);
static void fetch_elf_core_registers (char *, unsigned, int, CORE_ADDR);
-/* Size of elements in jmpbuf */
-
-#define JB_ELEMENT_SIZE 8
-
-/* The definition for JB_PC in machine/reg.h is wrong.
- And we can't get at the correct definition in setjmp.h as it is
- not always available (eg. if _POSIX_SOURCE is defined which is the
- default). As the defintion is unlikely to change (see comment
- in <setjmp.h>, define the correct value here. */
-
-#undef JB_PC
-#define JB_PC 2
-
-/* Figure out where the longjmp will land.
- We expect the first arg to be a pointer to the jmp_buf structure from which
- we extract the pc (JB_PC) that we will land at. The pc is copied into PC.
- This routine returns true on success. */
-
-int
-get_longjmp_target (CORE_ADDR *pc)
-{
- CORE_ADDR jb_addr;
- char raw_buffer[ALPHA_MAX_REGISTER_RAW_SIZE];
-
- jb_addr = read_register (ALPHA_A0_REGNUM);
-
- if (target_read_memory (jb_addr + JB_PC * JB_ELEMENT_SIZE, raw_buffer,
- sizeof (CORE_ADDR)))
- return 0;
-
- *pc = extract_address (raw_buffer, sizeof (CORE_ADDR));
- return 1;
-}
-
/* Extract the register values out of the core file and store
them where `read_register' will find them.