From: Andrew Cagney Date: Sun, 15 Feb 2004 22:05:44 +0000 (+0000) Subject: 2004-02-15 Andrew Cagney X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5929a91098661a96a8fd889af00aebe461fc831a;p=binutils-gdb.git 2004-02-15 Andrew Cagney * 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 569ca2e9957..7a5a2ade080 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +2004-02-15 Andrew Cagney + + * 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 * dwarf2-frame.h (dwarf2_frame_set_init_reg): New prototype. diff --git a/gdb/config/arm/tm-linux.h b/gdb/config/arm/tm-linux.h index dd41540786b..306f837c3b8 100644 --- a/gdb/config/arm/tm-linux.h +++ b/gdb/config/arm/tm-linux.h @@ -26,9 +26,6 @@ #include "config/tm-linux.h" -/* Offset to saved PC in sigcontext structure, from */ -#define SIGCONTEXT_PC_OFFSET (sizeof(unsigned long) * 18) - /* We've multi-arched this. */ #undef IN_SOLIB_CALL_TRAMPOLINE diff --git a/gdb/config/i386/tm-i386bsd.h b/gdb/config/i386/tm-i386bsd.h index e2b2229efa7..fef009ec01d 100644 --- a/gdb/config/i386/tm-i386bsd.h +++ b/gdb/config/i386/tm-i386bsd.h @@ -37,9 +37,4 @@ #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 . */ -#define SIGCONTEXT_PC_OFFSET 20 - #endif /* ifndef TM_I386BSD_H */ diff --git a/gdb/config/mips/tm-nbsd.h b/gdb/config/mips/tm-nbsd.h index 143f3a43114..fb30761111c 100644 --- a/gdb/config/mips/tm-nbsd.h +++ b/gdb/config/mips/tm-nbsd.h @@ -22,9 +22,6 @@ #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" diff --git a/gdb/config/ns32k/tm-nbsd.h b/gdb/config/ns32k/tm-nbsd.h index 88b4e226942..8e530d411dd 100644 --- a/gdb/config/ns32k/tm-nbsd.h +++ b/gdb/config/ns32k/tm-nbsd.h @@ -29,9 +29,4 @@ #include "ns32k/tm-ns32k.h" -/* Saved Pc. Get it from sigcontext if within sigtramp. */ - -/* Offset to saved PC in sigcontext, from . */ -#define SIGCONTEXT_PC_OFFSET 20 - #endif /* TM_NBSD_H */ diff --git a/gdb/config/vax/tm-vaxbsd.h b/gdb/config/vax/tm-vaxbsd.h index e24049a6ec6..47c9f8cbbab 100644 --- a/gdb/config/vax/tm-vaxbsd.h +++ b/gdb/config/vax/tm-vaxbsd.h @@ -34,8 +34,4 @@ #define SIGTRAMP_START(pc) STACK_END_ADDR #define SIGTRAMP_END(pc) 0x80000000 -/* Offset to saved PC in sigcontext, from . */ -/* XXXJRT should go away */ -#define SIGCONTEXT_PC_OFFSET 12 - #endif /* TM_VAXBSD_H */ diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c index dc143bbc36b..ecd3864d995 100644 --- a/gdb/ns32k-tdep.c +++ b/gdb/ns32k-tdep.c @@ -331,9 +331,10 @@ ns32k_sigtramp_saved_pc (struct frame_info *frame) 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 . 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); } diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c index 169b5328688..809330eba09 100644 --- a/gdb/vax-tdep.c +++ b/gdb/vax-tdep.c @@ -141,9 +141,10 @@ vax_sigtramp_saved_pc (struct frame_info *frame) 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 . 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); }