Bug 12099

Summary: process("/path/to/shell-script") probes
Product: systemtap Reporter: Frank Ch. Eigler <fche>
Component: translatorAssignee: Unassigned <systemtap>
Status: RESOLVED FIXED    
Severity: normal CC: jistone
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description Frank Ch. Eigler 2010-10-05 20:17:17 UTC
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 ...]
Comment 1 Josh Stone 2010-12-15 20:53:02 UTC
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
Comment 2 Frank Ch. Eigler 2011-04-27 13:50:38 UTC
commit 8e13c1a1 and predecessors include this function