summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1999-06-26 07:31:13 +0000
committerbde <bde@FreeBSD.org>1999-06-26 07:31:13 +0000
commitf1f4d770fd09e566d32f451220a780e147629281 (patch)
tree0cbc9dd48801d197b34255b40ac745d59d2d55c6 /usr.bin
parent038f23db196442159b06c81a4252f05555ac884e (diff)
downloadFreeBSD-src-f1f4d770fd09e566d32f451220a780e147629281.zip
FreeBSD-src-f1f4d770fd09e566d32f451220a780e147629281.tar.gz
Decode all currently supported values of the ptrace `request' arg.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/kdump/kdump.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c
index 8bd127c..27ea544 100644
--- a/usr.bin/kdump/kdump.c
+++ b/usr.bin/kdump/kdump.c
@@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)kdump.c 8.1 (Berkeley) 6/6/93";
#endif
static const char rcsid[] =
- "$Id: kdump.c,v 1.12 1999/05/21 01:09:45 jmz Exp $";
+ "$Id: kdump.c,v 1.13 1999/06/16 18:46:40 dt Exp $";
#endif /* not lint */
#define KERNEL
@@ -233,7 +233,7 @@ int nsyscalls = sizeof (syscallnames) / sizeof (syscallnames[0]);
static char *ptrace_ops[] = {
"PT_TRACE_ME", "PT_READ_I", "PT_READ_D", "PT_READ_U",
"PT_WRITE_I", "PT_WRITE_D", "PT_WRITE_U", "PT_CONTINUE",
- "PT_KILL", "PT_STEP",
+ "PT_KILL", "PT_STEP", "PT_ATTACH", "PT_DETACH",
};
ktrsyscall(ktr)
@@ -271,8 +271,25 @@ ktrsyscall(ktr)
ip++;
narg--;
} else if (ktr->ktr_code == SYS_ptrace) {
- if (*ip <= PT_STEP && *ip >= 0)
+ if (*ip < sizeof(ptrace_ops) /
+ sizeof(ptrace_ops[0]) && *ip >= 0)
(void)printf("(%s", ptrace_ops[*ip]);
+#ifdef PT_GETREGS
+ else if (*ip == PT_GETREGS)
+ (void)printf("(%s", "PT_GETREGS");
+#endif
+#ifdef PT_SETREGS
+ else if (*ip == PT_SETREGS)
+ (void)printf("(%s", "PT_SETREGS");
+#endif
+#ifdef PT_GETFPREGS
+ else if (*ip == PT_GETFPREGS)
+ (void)printf("(%s", "PT_GETFPREGS");
+#endif
+#ifdef PT_SETFPREGS
+ else if (*ip == PT_SETFPREGS)
+ (void)printf("(%s", "PT_SETFPREGS");
+#endif
else
(void)printf("(%ld", (long)*ip);
c = ',';
OpenPOWER on IntegriCloud