Bug 12099 - process("/path/to/shell-script") probes
Summary: process("/path/to/shell-script") probes
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: translator (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-05 20:17 UTC by Frank Ch. Eigler
Modified: 2011-04-27 13:50 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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