RFC: path display and path filtering features.

Grant Edwards grant.b.edwards at gmail.com
Wed Feb 23 20:16:43 UTC 2011


Attached are my current diffs. I've merged recent changes from the
main git repository and cleaned up loose ends.

The general approach is:

 1) Store -P arguments both as-is and canonicalized.

 2) Compare stored paths against /proc/$pid/fd/$fd for fd arguments.

 3) Compare stored paths against path arguments.

Things on the possible (near-term) todo list:

 1) Canonicalize relative path args based on /proc/$pid/cwd

 2) Handle combination fd/path args such as those passed to openat()

 3) Handle non-simple fd args like fd_set args passed to select() or
    the array of pollfd structs passed to poll().

Things on the possible (far-term) todo list:

 1) Figure out a way at the "exiting" stage to handle matching
    descriptors that are return values from syscalls that have been
    filtered (not printed) at the "entering" stage.

 2) Add argument type info to the sys_ent table so that generic code
    can be used to check for matching fd/path arguments.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pathtrace.patch
Type: application/patch
Size: 31058 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20110223/8be0c281/attachment.bin>

More information about the Strace-devel mailing list