summaryrefslogtreecommitdiffstats
path: root/util.cxx
diff options
context:
space:
mode:
authorStan Cox <scox@redhat.com>2009-12-08 11:57:00 -0500
committerStan Cox <scox@redhat.com>2009-12-08 11:57:00 -0500
commit63b4fd1474ec5859fac4c9b710c8f466bcd3b0f7 (patch)
tree2c696530833b8fbe560e29daacd0fb9b2f71fe54 /util.cxx
parent851418deb65964ef73f55e2aab0f3733c0e0e2e8 (diff)
downloadsystemtap-steved-63b4fd1474ec5859fac4c9b710c8f466bcd3b0f7.tar.gz
systemtap-steved-63b4fd1474ec5859fac4c9b710c8f466bcd3b0f7.tar.xz
systemtap-steved-63b4fd1474ec5859fac4c9b710c8f466bcd3b0f7.zip
Add .library("lib").mark("mark") and use it for .mark semaphores.
tapset-utrace.cxx (TOK_LIBRARY): New. (utrace_derived_probe::utrace_derived_probe): Add library and has_library. (utrace_builder::build): Handle library. (utrace_derived_probe_group::emit_probe_decl): Add sdt_sem_offset to emitted stap_utrace_probes. Add stap_task_finder_target mmap_callback for handling shared library. Handle sdt_sem_offset in emitted_stp_utrace_probe_cb. Add stap_utrace_mmap_found. (register_tapset_utrace): Handle .library tapset-utrace.cxx (TOK_LIBRARY): New. (base_query::base_query): Add path and has_library. (dwarf_derived_probe::dwarf_derived_probe) Likewise. (dwarf_derived_probe::register_patterns): Handle .library (sdt_query::convert_location): Likewise. (dwarf_builder::build): Likewise. (uprobe_derived_probe_group::emit_module_decls): Emit sdt_sem_address. Add sdt_sem_offset to emitted stap_uprobe_spec. Add offset and vm_flags to signature of stap_uprobe_change_plus, and handle sdt_sem_offset. Allow writeable segments in emitted stap_uprobe_mmap_found. sdt_misc.exp: Test .library util.cxx (find_executable): Add env_path to sig and use it in getenv. util.h (find_executable): Likewise. Make "PATH" the default. dtrace.in (provider): Turn on semaphores. sdt.h: Likewise.
Diffstat (limited to 'util.cxx')
-rw-r--r--util.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.cxx b/util.cxx
index bffeb04e..736e5a30 100644
--- a/util.cxx
+++ b/util.cxx
@@ -244,7 +244,7 @@ tokenize(const string& str, vector<string>& tokens,
// same policy as execvp(). A program name not containing a slash
// will be searched along the $PATH.
-string find_executable(const string& name)
+string find_executable(const string& name, const string& env_path)
{
string retpath;
@@ -259,7 +259,7 @@ string find_executable(const string& name)
}
else // Nope, search $PATH.
{
- char *path = getenv("PATH");
+ char *path = getenv(env_path.c_str());
if (path)
{
// Split PATH up.