aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386bsd-tdep.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2002-07-02 09:12:37 +0000
committerMark Kettenis <kettenis@gnu.org>2002-07-02 09:12:37 +0000
commit6bff26defb5723704ec856ed739f8e733a443a00 (patch)
tree237285373f990257618aa7877436e5bb1420cdc5 /gdb/i386bsd-tdep.c
parent99881371eb4a78527f3e00841833eca312f218a7 (diff)
downloadgdb-6bff26defb5723704ec856ed739f8e733a443a00.zip
gdb-6bff26defb5723704ec856ed739f8e733a443a00.tar.gz
gdb-6bff26defb5723704ec856ed739f8e733a443a00.tar.bz2
* i386-tdep.c (i386_frameless_signal_p): New function.
(i386_frame_chain): Deal with frameless signals. (i386_sigtramp_saved_sp): New function. (i386_frame_saved_pc): Deal with frameless signals. (i386_saved_pc_after_call): Make sure the correct value is returned just after entry into a sigtramp. * i386bsd-tdep.c (i386bsd_sc_sp_offset, i386nbsd_sc_sp_offset, i386fbsd4_sc_sp_offset): New variables. (i386bsd_init_abi, i386nbsd_init_abi, i386fbsd4_init_abi): Use these variables to initialize tdep->sc_sp_offset. * i386bsd-nat.c (_initialize_i386bsd_nat): Add sanity check for sc_sp_offset similiar to what we already did for sc_pc_offset. * i386-sol2-tdep.c (i386_sol2_init_abi): Initialize tdep->sc_sp_offset.
Diffstat (limited to 'gdb/i386bsd-tdep.c')
-rw-r--r--gdb/i386bsd-tdep.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/i386bsd-tdep.c b/gdb/i386bsd-tdep.c
index a419cab..61213ff 100644
--- a/gdb/i386bsd-tdep.c
+++ b/gdb/i386bsd-tdep.c
@@ -89,6 +89,7 @@ i386bsd_aout_in_solib_call_trampoline (CORE_ADDR pc, char *name)
/* From <machine/signal.h>. */
int i386bsd_sc_pc_offset = 20;
+int i386bsd_sc_sp_offset = 8;
static void
i386bsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
@@ -107,12 +108,14 @@ i386bsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->sigtramp_end = 0xfdbfe000;
tdep->sigcontext_addr = i386bsd_sigcontext_addr;
tdep->sc_pc_offset = i386bsd_sc_pc_offset;
+ tdep->sc_sp_offset = i386bsd_sc_sp_offset;
}
/* NetBSD 1.0 or later. */
/* From <machine/signal.h>. */
int i386nbsd_sc_pc_offset = 44;
+int i386nbsd_sc_sp_offset = 56;
static void
i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
@@ -132,6 +135,7 @@ i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* NetBSD has a `struct sigcontext' that's different from the
origional 4.3 BSD. */
tdep->sc_pc_offset = i386nbsd_sc_pc_offset;
+ tdep->sc_sp_offset = i386nbsd_sc_sp_offset;
}
/* NetBSD ELF. */
@@ -198,6 +202,7 @@ i386fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* From <machine/signal.h>. */
int i386fbsd4_sc_pc_offset = 76;
+int i386fbsd4_sc_sp_offset = 88;
static void
i386fbsd4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
@@ -210,6 +215,7 @@ i386fbsd4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* FreeBSD 4.0 introduced a new `struct sigcontext'. */
tdep->sc_pc_offset = i386fbsd4_sc_pc_offset;
+ tdep->sc_sp_offset = i386fbsd4_sc_sp_offset;
}