summaryrefslogtreecommitdiffstats
path: root/usr.bin/truss/truss.h
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2007-04-10 04:03:34 +0000
committerdelphij <delphij@FreeBSD.org>2007-04-10 04:03:34 +0000
commit70cda62de51a69e83aae7565ff882b9edd048d14 (patch)
tree7ee5d84012b77bdd06777d2992c7aec9f559b5ce /usr.bin/truss/truss.h
parent96664c6737f5b26e562ce2c7fd207087f97ed9a7 (diff)
downloadFreeBSD-src-70cda62de51a69e83aae7565ff882b9edd048d14.zip
FreeBSD-src-70cda62de51a69e83aae7565ff882b9edd048d14.tar.gz
Make use of ptrace(2) instead of procfs in truss(1), eliminating
yet another need of an available /proc/ mount. Tested with: make universe Submitted by: howardsu Reviewed by: alfred
Diffstat (limited to 'usr.bin/truss/truss.h')
-rw-r--r--usr.bin/truss/truss.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/usr.bin/truss/truss.h b/usr.bin/truss/truss.h
index 575260b..8533fae 100644
--- a/usr.bin/truss/truss.h
+++ b/usr.bin/truss/truss.h
@@ -25,6 +25,8 @@
* $FreeBSD$
*/
+#include <sys/queue.h>
+
#define FOLLOWFORKS 0x00000001
#define RELATIVETIMESTAMPS 0x00000002
#define ABSOLUTETIMESTAMPS 0x00000004
@@ -32,17 +34,30 @@
#define EXECVEARGS 0x00000010
#define EXECVEENVS 0x00000020
+struct threadinfo
+{
+ SLIST_ENTRY(threadinfo) entries;
+ lwpid_t tid;
+ int in_syscall;
+ int in_fork;
+};
+
struct trussinfo
{
int pid;
int flags;
- int in_fork;
+ int pr_why;
+ int pr_data;
int strsize;
FILE *outfile;
struct timespec start_time;
struct timespec before;
struct timespec after;
+
+ struct threadinfo *curthread;
+
+ SLIST_HEAD(, threadinfo) threadlist;
};
#define timespecsubt(tvp, uvp, vvp) \
@@ -54,3 +69,10 @@ struct trussinfo
(vvp)->tv_nsec += 1000000000; \
} \
} while (0)
+
+#define S_NONE 0
+#define S_SCE 1
+#define S_SCX 2
+#define S_EXIT 3
+#define S_SIG 4
+#define S_EXEC 5
OpenPOWER on IntegriCloud