For more half-baked ideas, see the ideas tag.
Why’s it not possible to run a deeply nested set of programs (eg. a large build) and have strace or gdb just trigger on a particular program? For example you could do a regular expression match on a command line:
exectrace --run=strace --cmd="\./prog.*-l" -- make check
would (given this theoretical exectrace tool) trigger strace when any child process of the
make check matches the regexp
Or perhaps you could trigger on current directory:
exectrace --run=strace --cwd=tests -- make check
I guess this could be implemented using PTRACE_O_TRACEEXEC, and it should have less overhead then doing a full recursive strace, and less annoyance than trying to trace a child in gdb (which AFAIK is next to impossible).