e.g. busybox ash on an Alpine machine, for reducing bugs from regtest/aports. These techniques do NOT require recompilation, debug symbols, or source code modification
Shell interpreter tracing with set -x aka set -o xtrace - show shell statements executed
rm and cat commonly, and then we implemented builtin rm and builtin catset -x; export SHELLOPTS - bash and OSH have a feature where you can export SHELLOPTS to set -x on all child processesXTRACE_FD= env var to send all the traces to the same place; I don't think OSH has this yetstrace myprog - show syscalls
$PWD bug-f -o FILE and then start replacing the PIDs with a human name in the file to analyze e.g. races-e t=chdir,file,read,write, to limit the shown syscalls (e.g. memory is usually irrelevant)-v to not abbreviate-s 1000 to abbreviate strings only after 1000 characters (needs to be in addition to -v-c flag creates a histogram of syscalls-f flag follows child processesstrace -ff -o prefix - follow forks, creates prefix.$PID filesltrace myprog - show libc calls
-e flagsetlocale() calls in bash versus OSHgdb --args myprog --flaguftrace - user space function tracing
systemtap - we have DTRACE_PROBE() calls in the Oils C++ source coderegtest/aports