aboutsummaryrefslogtreecommitdiff
path: root/gdb/ns32k-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ns32k-tdep.c')
-rw-r--r--gdb/ns32k-tdep.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c
index dc143bb..ecd3864 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 <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);
}