summaryrefslogtreecommitdiff
path: root/gdb/i386bsd-tdep.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2002-07-01 21:16:32 +0000
committerMark Kettenis <kettenis@gnu.org>2002-07-01 21:16:32 +0000
commit2eae7bdf8b9733bfc8f12ff5ec20fe1274514a7e (patch)
tree9d72a486ee85044323551d515049c24096ac3bf2 /gdb/i386bsd-tdep.c
parent6725ef7e8b5f88aad1fcba6d047af337f6b8bea0 (diff)
downloadgdb-2eae7bdf8b9733bfc8f12ff5ec20fe1274514a7e.tar.gz
* i386-tdep.h (struct gdbarch_tdep): Replace sigtramp_saved_pc
with sigcontext_addr. Add sc_sp_offset. (i386bsd_sigtramp_saved_pc): Remove prototype. (i386bsd_sicontext_addr): Add prototype. * i386-tdep.c (i386_sigtramp_saved_pc): New function. (i386_frame_saved_pc): Rewrite to call i386_sigtramp_saved_pc. (i386_svr4_sigtramp_saved_pc): Removed. (i386_svr4_sigcontext_addr): New function. (i386_svr4_init_abi): Don't initialize tdep->sigtramp_saved_pc. Initialize tdep->sigcontext_addr instead. Initialize tdep->sc_pc_offset and tdep->sc_sp_offset. (i386_gdbarch_init): Likewise. * i386bsd-tdep.c (i386bsd_sigcontext_addr): Don't make it static any more. (i386bsd_sigtramp_saved_pc): Remove function. (i386bsd_init_abi): Don't initialize tdep->sigtramp_saved_pc. Initialize tdep->sigcontext_addr instead. Initialize tdep->sc_pc_offset. * i386-linux-tdep.c (i386_linux_init_abi): Remove initialization of tdep->sigtramp_saved_pc. * i386-sol2-tdep.c (i386_sol2_init_abi): Don't initialize tdep->sigtramp_saved_pc. Initialize tdep->sigcontext_addr instead.
Diffstat (limited to 'gdb/i386bsd-tdep.c')
-rw-r--r--gdb/i386bsd-tdep.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/gdb/i386bsd-tdep.c b/gdb/i386bsd-tdep.c
index a82733de5e5..a419cab87d3 100644
--- a/gdb/i386bsd-tdep.c
+++ b/gdb/i386bsd-tdep.c
@@ -39,9 +39,12 @@ i386bsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
}
/* Assuming FRAME is for a BSD sigtramp routine, return the address of
- the associated sigcontext structure. */
+ the associated sigcontext structure.
-static CORE_ADDR
+ Note: This function is used for Solaris 2 too, so don't make it
+ static. */
+
+CORE_ADDR
i386bsd_sigcontext_addr (struct frame_info *frame)
{
if (frame->next)
@@ -55,22 +58,6 @@ i386bsd_sigcontext_addr (struct frame_info *frame)
return read_memory_unsigned_integer (read_register (SP_REGNUM) + 8, 4);
}
-/* Assuming FRAME is for a BSD sigtramp routine, return the saved
- program counter.
-
- Note: This function is used for Solaris 2 too, so don't make it
- static. */
-
-CORE_ADDR
-i386bsd_sigtramp_saved_pc (struct frame_info *frame)
-{
- int sc_pc_offset = gdbarch_tdep (current_gdbarch)->sc_pc_offset;
- CORE_ADDR addr;
-
- addr = i386bsd_sigcontext_addr (frame);
- return read_memory_unsigned_integer (addr + sc_pc_offset, 4);
-}
-
/* Return the start address of the sigtramp routine. */
CORE_ADDR
@@ -116,9 +103,9 @@ i386bsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->jb_pc_offset = 0;
- tdep->sigtramp_saved_pc = i386bsd_sigtramp_saved_pc;
tdep->sigtramp_start = 0xfdbfdfc0;
tdep->sigtramp_end = 0xfdbfe000;
+ tdep->sigcontext_addr = i386bsd_sigcontext_addr;
tdep->sc_pc_offset = i386bsd_sc_pc_offset;
}