Hi,
I've been working with ptrace() and thought I'd take
the time to make a minor update to the man page:
Index: ptrace.2
===================================================================
RCS file: /home/ncvs/src/lib/libc/sys/ptrace.2,v
retrieving revision 1.14
diff -u -r1.14 ptrace.2
--- ptrace.2 2000/05/04 13:09:15 1.14
+++ ptrace.2 2000/10/13 03:39:46
@@ -143,6 +143,13 @@
.Fa data
provides a signal number to be delivered to the traced process as it
resumes execution, or 0 if no signal is to be sent.
+.It Dv PT_STEP
+The traced process is single stepped one instruction.
+The
+.Fa addr
+and
+.Fa data
+fields are not used.
.It Dv PT_KILL
The traced process terminates, as if
.Dv PT_CONTINUE
@@ -306,7 +313,9 @@
.Xr execve 2 ,
.Xr sigaction 2 ,
.Xr wait 2 ,
-.Xr execv 3
+.Xr execv 3 ,
+.Xr i386_clr_watch 3 ,
+.Xr i386_set_watch 3
.Sh HISTORY
A
.Fn ptrace
Also, in looking at the ptrace code, I'd like to make the following
minor change to remove a bogus parameter check:
Index: sys_process.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/sys_process.c,v
retrieving revision 1.52
diff -u -r1.52 sys_process.c
--- sys_process.c 2000/08/30 04:49:07 1.52
+++ sys_process.c 2000/10/13 03:52:03
@@ -322,7 +322,7 @@
case PT_STEP:
case PT_CONTINUE:
case PT_DETACH:
- if ((unsigned)uap->data >= NSIG)
+ if ((uap->req != PT_STEP) && ((unsigned)uap->data >= NSIG))
return EINVAL;
PHOLD(p);
Comments welcome!
Thanks,
John
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message