aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2004-08-22 20:34:55 +0000
committerMark Kettenis <kettenis@gnu.org>2004-08-22 20:34:55 +0000
commit1c5bf4196bff5c57446bd9d7a00ae4a20ded34e4 (patch)
tree5c05f398a7c2a2cef22898e41a7a8d623b2e4ed4
parent8cbba7c88185e1f9775509402b24639eb3018e45 (diff)
downloadgdb-1c5bf4196bff5c57446bd9d7a00ae4a20ded34e4.zip
gdb-1c5bf4196bff5c57446bd9d7a00ae4a20ded34e4.tar.gz
gdb-1c5bf4196bff5c57446bd9d7a00ae4a20ded34e4.tar.bz2
* amd64obsd-tdep.c (amd64obsd_sigtramp_p): Use
safe_frame_unwind_memory instead of target_read_memory.
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/amd64obsd-tdep.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index dd0eb85..37807a1 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
2004-08-22 Mark Kettenis <kettenis@gnu.org>
+ * amd64obsd-tdep.c (amd64obsd_sigtramp_p): Use
+ safe_frame_unwind_memory instead of target_read_memory.
+
* infptrace.c: Remove #ifdef'ed out inclusion of gdb_stat.h.
Reorder includes.
(fetch_register, store_register): Remove prototypes.
diff --git a/gdb/amd64obsd-tdep.c b/gdb/amd64obsd-tdep.c
index 0c742a2..f97b9a6 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