Sometimes a putative process file isn't really ELF, so we should try to open it, and see if it's a shebang type executable script, and map. ie. $ cat foo.sh #! /bin/sh echo yo momma $ stap -L 'probe process("foo.sh").function("*")' process("/bin/sh").function("main") [... etc ...]
Rayson committed d1bcbe71, which covers the basic case. Here are a couple of examples that I think also deserve coverage: #! /usr/bin/env foo #! /usr/bin/foo -args
commit 8e13c1a1 and predecessors include this function