RFC: path display and path filtering features.

Grant Edwards grant.b.edwards at gmail.com
Thu Feb 17 17:29:27 UTC 2011


I've re-written the path display/trace features.  Attached is a
snapshot of the diffs against the current git HEAD.  Changes since the
first version I posted follow:

 * Removed the code that tracked fd-table state based on syscalls.  It
   now does a readlink() on /proc/<pid>/fd/<fd> to find the path
   associated with a file descriptor.

 * Change the -P option so that instead of accepting a colon-separated
   list of paths, it accepts a single path.  Multiple -P options can
   be specified to trace multiple paths.

 * Change the way that file descriptors are printed by the display
   functions.  Instead of using "%s" and a function that returns a
   formatted string, they now use a printfd() function analogous to
   the printpath() function.

 * Added handling (for Linux) for system calls where we need to look
   at something other than arg[0] for a descriptor/path.

Feedback is welcome...

-- 
Grant


-------------- next part --------------
A non-text attachment was scrubbed...
Name: pathtrace.patch
Type: application/patch
Size: 25949 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20110217/f59de753/attachment.bin>


More information about the Strace-devel mailing list