RFC strace via gdbserver

Stan Cox scox at redhat.com
Wed Nov 9 23:47:31 UTC 2016


> It's still not clear to me what it means to "follow" syscalls for :2.
> Is that copying the syscall watchlist to the child?
es the default?

It was an attempt to mimic this behavior by filtering the tids and 
syscalls in gdb_catch_this_syscall_p.

/usr/bin/strace -f tstthreads.x
...
mprotect(0x7f2a605b6000, 4096, PROT_NONE) = 0
clone(/usr/bin/strace: Process 30335 attached
child_stack=0x7f2a60db5ff0, ...
[pid 30335] set_robust_list(0x7f2a60db69e0, 24 <unfinished ...>
[pid 30334] futex(0x7f2a60db69d0, FUTEX_WAIT, 30335, NULL <unfinished ...>
[pid 30335] <... set_robust_list resumed> ) = 0
[pid 30335] +++ exited with 0 +++
exit_group(0)                           = ?
+++ exited with 0 +++

versus

/usr/bin/strace  tstthreads.x
...
mprotect(0x7f81351f0000, 4096, PROT_NONE) = 0
clone(child_stack=0x7f81359efff0, ...
futex(0x7f81359f09d0, FUTEX_WAIT, 30344, NULL) = 0
exit_group(0)                           = ?
+++ exited with 0 +++

Going to be a lot easier to do the following though...

> Well, these can still be dependent on the presence of -f, but yeah.

Right, we'll tie it that way.




More information about the Strace-devel mailing list