Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/linux/common Fixes by Chuck Silvers to make ptrac...
details: https://anonhg.NetBSD.org/src/rev/439253c37199
branches: trunk
changeset: 510676:439253c37199
user: manu <manu%NetBSD.org@localhost>
date: Mon Jun 04 07:44:39 2001 +0000
description:
Fixes by Chuck Silvers to make ptrace PEEKTEXT more 64 bit friendy
diffstat:
sys/compat/linux/common/linux_misc.c | 29 +++++++++++++----------------
1 files changed, 13 insertions(+), 16 deletions(-)
diffs (50 lines):
diff -r 8f9d64e52e4f -r 439253c37199 sys/compat/linux/common/linux_misc.c
--- a/sys/compat/linux/common/linux_misc.c Mon Jun 04 06:01:40 2001 +0000
+++ b/sys/compat/linux/common/linux_misc.c Mon Jun 04 07:44:39 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_misc.c,v 1.91 2001/06/03 18:22:27 manu Exp $ */
+/* $NetBSD: linux_misc.c,v 1.92 2001/06/04 07:44:39 manu Exp $ */
/*-
* Copyright (c) 1995, 1998, 1999 The NetBSD Foundation, Inc.
@@ -1230,9 +1230,6 @@
while (*ptr != -1)
if (*ptr++ == request) {
struct sys_ptrace_args pta;
- caddr_t sg;
-
- sg = stackgap_init(p->p_emul);
SCARG(&pta, req) = *ptr;
SCARG(&pta, pid) = SCARG(uap, pid);
@@ -1249,18 +1246,18 @@
SCARG(&pta, addr) = (caddr_t) 1;
error = sys_ptrace(p, &pta, retval);
- if (!error)
- switch (request) {
- case LINUX_PTRACE_PEEKTEXT:
- case LINUX_PTRACE_PEEKDATA:
- error = copyout (retval,
- (caddr_t)(u_long)SCARG(&pta, data),
- sizeof retval);
- *retval = SCARG(&pta, data);
- break;
- default:
- break;
- }
+ if (error)
+ return error;
+ switch (request) {
+ case LINUX_PTRACE_PEEKTEXT:
+ case LINUX_PTRACE_PEEKDATA:
+ error = copyout (retval,
+ (caddr_t)SCARG(uap, data), sizeof *retval);
+ *retval = SCARG(uap, data);
+ break;
+ default:
+ break;
+ }
return error;
}
else
Home |
Main Index |
Thread Index |
Old Index