This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Use safe_frame_unwind_memory in amd64obsd-tdep.c
- From: Mark Kettenis <kettenis at chello dot nl>
- To: gdb-patches at sources dot redhat dot com
- Date: Sun, 22 Aug 2004 22:47:59 +0200 (CEST)
- Subject: [PATCH] Use safe_frame_unwind_memory in amd64obsd-tdep.c
Committed,
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* amd64obsd-tdep.c (amd64obsd_sigtramp_p): Use
safe_frame_unwind_memory instead of target_read_memory.
Index: amd64obsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/amd64obsd-tdep.c,v
retrieving revision 1.14
diff -u -p -r1.14 amd64obsd-tdep.c
--- amd64obsd-tdep.c 29 May 2004 15:09:18 -0000 1.14
+++ amd64obsd-tdep.c 22 Aug 2004 20:33:42 -0000
@@ -90,6 +90,7 @@ amd64obsd_sigtramp_p (struct frame_info
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
/* 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