diff options
author | Grant Edwards <grant.b.edwards@gmail.com> | 2011-04-07 20:25:40 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2011-04-08 20:47:56 +0000 |
commit | 8a08277d13d0378c2ff3ce851534c3bf7e31defa (patch) | |
tree | 3bf9bb239f86ccde9b8b285fc7683def48943ff3 /strace.1 | |
parent | 4cee0af77b0275740f7f97ae5d778f60d5ac7f88 (diff) | |
download | strace-8a08277d13d0378c2ff3ce851534c3bf7e31defa.tar.gz strace-8a08277d13d0378c2ff3ce851534c3bf7e31defa.tar.bz2 strace-8a08277d13d0378c2ff3ce851534c3bf7e31defa.tar.xz |
Add ability to print file descriptor paths and filter by those paths
* pathtrace.c: New file, implements matching syscall arguments to
user-specified file paths.
* Makefile.am (strace_SOURCES): Add pathtrace.c.
* defs.h (TCB_FILTERED, filtered): New defines.
(getfdpath, pathtrace_select, pathtrace_match, show_fd_path,
tracing_paths): New declarations.
* strace.c (show_fd_path, tracing_paths): New global variables.
(usage, main): Implement handling of -y and -P options.
* strace.1: Add descriptions of -y and -P options.
* syscall.c (trace_syscall_entering): Add path matching logic to the
print/noprint decision and set the TCB_FILTERED bit appropriately.
(trace_syscall_exiting): Use filtered() macro that checks the
TCB_FILTERED bit to determine print/noprint status.
* util.c (printfd): Use getfdpath().
Diffstat (limited to 'strace.1')
-rw-r--r-- | strace.1 | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -43,7 +43,7 @@ strace \- trace system calls and signals .SH SYNOPSIS .B strace [ -.B \-CdDffhiqrtttTvxx +.B \-CdDffhiqrtttTvxxy ] [ .BI \-a column @@ -60,6 +60,10 @@ strace \- trace system calls and signals ] \&... [ +.BI \-P path +] +\&... +[ .BI \-s strsize ] [ @@ -358,6 +362,9 @@ Print all non-ASCII strings in hexadecimal string format. .B \-xx Print all strings in hexadecimal string format. .TP +.B \-y +Print paths associated with file descriptor arguments. +.TP .BI "\-a " column Align return values in a specific column (default column 40). .TP @@ -549,6 +556,13 @@ options can be used to attach to up to 32 processes in addition to .B \-p option is given). .TP +.BI "\-P " path +Trace only system calls accessing +.I path. +Multiple +.B \-P +options can be used to specify up to 256 paths. +.TP .BI "\-s " strsize Specify the maximum string size to print (the default is 32). Note that filenames are not considered strings and are always printed in |