ptrace: do not print addr and data arguments of PTRACE_ATTACH-like requests
As kernel ignores addr and data arguments of PTRACE_ATTACH,
PTRACE_INTERRUPT, PTRACE_KILL, and PTRACE_LISTEN request,
we do not print them either.
* process.c (SYS_FUNC(ptrace)): After printing pid argument, return
RVAL_DECODED if request is one of PTRACE_ATTACH, PTRACE_INTERRUPT,
PTRACE_KILL, or PTRACE_LISTEN.
diff --git a/process.c b/process.c
index f53c12e..620cc1f 100644
--- a/process.c
+++ b/process.c
@@ -97,24 +97,34 @@
}
/* pid */
- tprintf(", %d, ", pid);
+ tprintf(", %d", pid);
/* addr */
switch (request) {
+ case PTRACE_ATTACH:
+ case PTRACE_INTERRUPT:
+ case PTRACE_KILL:
+ case PTRACE_LISTEN:
+ /* addr and data are ignored */
+ return RVAL_DECODED;
case PTRACE_PEEKUSER:
case PTRACE_POKEUSER:
+ tprints(", ");
print_user_offset_addr(addr);
break;
case PTRACE_GETREGSET:
case PTRACE_SETREGSET:
+ tprints(", ");
printxval(nt_descriptor_types, addr, "NT_???");
break;
default:
+ tprints(", ");
printaddr(addr);
}
tprints(", ");
+ /* data */
switch (request) {
#ifndef IA64
case PTRACE_PEEKDATA: