summaryrefslogtreecommitdiff
path: root/gdb/amd64obsd-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/amd64obsd-tdep.c')
-rw-r--r--gdb/amd64obsd-tdep.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/amd64obsd-tdep.c b/gdb/amd64obsd-tdep.c
index 0c742a26ecc..f97b9a6c57e 100644
--- a/gdb/amd64obsd-tdep.c
+++ b/gdb/amd64obsd-tdep.c
@@ -90,6 +90,7 @@ amd64obsd_sigtramp_p (struct frame_info *next_frame)
0x67, 0x00, 0x00, 0x00, /* movq $SYS_sigreturn, %rax */
0xcd, 0x80 /* int $0x80 */
};
+ size_t buflen = (sizeof sigreturn) + 1;
char *name, *buf;
/* If the function has a valid symbol name, it isn't a
@@ -105,7 +106,7 @@ amd64obsd_sigtramp_p (struct frame_info *next_frame)
/* If we can't read the instructions at START_PC, return zero. */
buf = alloca ((sizeof sigreturn) + 1);
- if (target_read_memory (start_pc + 6, buf, (sizeof sigreturn) + 1))
+ if (!safe_frame_unwind_memory (next_frame, start_pc + 6, buf, buflen))
return 0;
/* Check for sigreturn(2). Depending on how the assembler encoded