- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 173
 
Process Tracing Tips and Tools
        andychu edited this page Sep 26, 2025 
        ·
        20 revisions
      
    - 
Shell interpreter tracing with
set -xakaset -o xtrace- Example from Andy: I used this to discover that autotool configure scripts call 
rmandcatcommonly, and then we implementedbuiltin rmandbuiltin cat 
 - Example from Andy: I used this to discover that autotool configure scripts call 
 - 
strace myprog- the 
-eflag filters by syscall - the 
-cflag creates a histogram of syscalls - Samuel used this for the 
$PWDbug 
 - the 
 - 
ltrace myprog- has an 
-eflag - Example from Andy: I used this to debug 
setlocale()calls in bash versus OSH 
 - has an 
 
- 
shell tracing with
set -x; export SHELLOPTS- bash and OSH have a feature where you canexport SHELLOPTSto make all processes trace - 
strace -ff -o prefix- follow forks, createsprefix.$PIDfiles