From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13477 invoked by alias); 24 Nov 2009 16:45:00 -0000 Received: (qmail 13414 invoked by uid 48); 24 Nov 2009 16:44:43 -0000 Date: Tue, 24 Nov 2009 16:45:00 -0000 Message-ID: <20091124164443.13413.qmail@sourceware.org> From: "fche at redhat dot com" To: systemtap@sources.redhat.com In-Reply-To: <20091108020716.10917.foom@fuhm.net> References: <20091108020716.10917.foom@fuhm.net> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug translator/10917] environment variable expansion in executable search X-Bugzilla-Reason: AssignedTo Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2009-q4/txt/msg00667.txt.bz2 ------- Additional Comments From fche at redhat dot com 2009-11-24 16:44 ------- James, in the PR10485 model, one would do this by installing a tapset file such as probe mystuff.hello = process("libMyStuff.so").function("hello") {} into /ANYWHERE/tapset/AUTOPATH/$INSTALL/lib/libMyStuff.so then stap -I /ANYWHERE/tapset -e 'probe mystuff.hello { }' This may be suitable for probe points that are a priori known interesting. For ad-hoc probing, there are a few other ways: 1) build the script on the fly: #! /bin/sh stap -e 'probe process("'$INSTALL'/lib/libMyStuff.so").function("hello") { ... }' so a shell does the interpolation. 2) put $INSTALL/lib into your temporary PATH, so that stap -e 'probe process("libMyStuff.so").function("hello") { }' would work since we search $PATH for unqualified process("..") names 3) (wait for systemtap bug #6880, which should automate searching for shared libraries based on program binaries and $LD_LIBRARY_PATH) 4) (wait for another possible extension: @env("name") as a parse-time expanded literal ... but this would also require parse-time concatenated string literals in order to be useful as a process probe parameter: probe process (@env("INSTALL") "/lib/libMyStuff.so") { | By the way the reason I'm hesitant about the original proposal -- interpolation of values within string literals -- is because this would be the first such scenario in systemtap. -- http://sourceware.org/bugzilla/show_bug.cgi?id=10917 ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.