* config/mips/tm-nbsd.h (SIGCONTEXT_PC_OFFSET): Delete macro.
* config/i386/tm-i386bsd.h (SIGCONTEXT_PC_OFFSET): Delete macro.
* config/arm/tm-linux.h (SIGCONTEXT_PC_OFFSET): Delete macro.
* config/vax/tm-vaxbsd.h (SIGCONTEXT_PC_OFFSET): Delete macro.
* vax-tdep.c (vax_sigtramp_saved_pc): Inline only reference.
* config/ns32k/tm-nbsd.h (SIGCONTEXT_PC_OFFSET): Delete macro.
* ns32k-tdep.c (ns32k_sigtramp_saved_pc): Inline only reference.
+2004-02-15 Andrew Cagney <cagney@redhat.com>
+
+ * config/mips/tm-nbsd.h (SIGCONTEXT_PC_OFFSET): Delete macro.
+ * config/i386/tm-i386bsd.h (SIGCONTEXT_PC_OFFSET): Delete macro.
+ * config/arm/tm-linux.h (SIGCONTEXT_PC_OFFSET): Delete macro.
+ * config/vax/tm-vaxbsd.h (SIGCONTEXT_PC_OFFSET): Delete macro.
+ * vax-tdep.c (vax_sigtramp_saved_pc): Inline only reference.
+ * config/ns32k/tm-nbsd.h (SIGCONTEXT_PC_OFFSET): Delete macro.
+ * ns32k-tdep.c (ns32k_sigtramp_saved_pc): Inline only reference.
+
2004-02-15 Mark Kettenis <kettenis@gnu.org>
* dwarf2-frame.h (dwarf2_frame_set_init_reg): New prototype.
#include "config/tm-linux.h"
-/* Offset to saved PC in sigcontext structure, from <asm/sigcontext.h> */
-#define SIGCONTEXT_PC_OFFSET (sizeof(unsigned long) * 18)
-
/* We've multi-arched this. */
#undef IN_SOLIB_CALL_TRAMPOLINE
#define SIGTRAMP_START(pc) 0xfdbfdfc0
#define SIGTRAMP_END(pc) 0xfdbfe000
-/* Saved Pc. Get it from sigcontext if within sigtramp. */
-
-/* Offset to saved PC in sigcontext, from <sys/signal.h>. */
-#define SIGCONTEXT_PC_OFFSET 20
-
#endif /* ifndef TM_I386BSD_H */
#ifndef TM_NBSD_H
#define TM_NBSD_H
-/* Saved Pc. Get it from sigcontext if within sigtramp. */
-#define SIGCONTEXT_PC_OFFSET 8
-
#include "mips/tm-mips.h"
#include "solib.h"
#include "ns32k/tm-ns32k.h"
-/* Saved Pc. Get it from sigcontext if within sigtramp. */
-
-/* Offset to saved PC in sigcontext, from <machine/signal.h>. */
-#define SIGCONTEXT_PC_OFFSET 20
-
#endif /* TM_NBSD_H */
#define SIGTRAMP_START(pc) STACK_END_ADDR
#define SIGTRAMP_END(pc) 0x80000000
-/* Offset to saved PC in sigcontext, from <sys/signal.h>. */
-/* XXXJRT should go away */
-#define SIGCONTEXT_PC_OFFSET 12
-
#endif /* TM_VAXBSD_H */
sigcontext_addr = read_memory_typed_address
(read_register (SP_REGNUM) + sigcontext_offs, builtin_type_void_data_ptr);
- /* Don't cause a memory_error when accessing sigcontext in case the stack
+ /* Offset to saved PC in sigcontext, from <machine/signal.h>. Don't
+ cause a memory_error when accessing sigcontext in case the stack
layout has changed or the stack is corrupt. */
- target_read_memory (sigcontext_addr + SIGCONTEXT_PC_OFFSET, buf, ptrbytes);
+ target_read_memory (sigcontext_addr + 20, buf, ptrbytes);
return extract_typed_address (buf, builtin_type_void_func_ptr);
}
sigcontext_addr = read_memory_typed_address
(read_register (SP_REGNUM) + sigcontext_offs, builtin_type_void_data_ptr);
- /* Don't cause a memory_error when accessing sigcontext in case the stack
+ /* Offset to saved PC in sigcontext, from <sys/signal.h>. Don't
+ cause a memory_error when accessing sigcontext in case the stack
layout has changed or the stack is corrupt. */
- target_read_memory (sigcontext_addr + SIGCONTEXT_PC_OFFSET, buf, ptrbytes);
+ target_read_memory (sigcontext_addr + 12, buf, ptrbytes);
return extract_typed_address (buf, builtin_type_void_func_ptr);
}