diff options
author | fche <fche> | 2008-01-23 23:42:06 +0000 |
---|---|---|
committer | fche <fche> | 2008-01-23 23:42:06 +0000 |
commit | 25114db1ce9c65a1b6844b9541c28f6e960821d8 (patch) | |
tree | 8c814d2b09ab78f3eb8e534da5a62b4e745c2f8b | |
parent | 6b535ce2ea1aebf408afe6cc51ef45b50f9a7879 (diff) | |
download | systemtap-steved-25114db1ce9c65a1b6844b9541c28f6e960821d8.tar.gz systemtap-steved-25114db1ce9c65a1b6844b9541c28f6e960821d8.tar.xz systemtap-steved-25114db1ce9c65a1b6844b9541c28f6e960821d8.zip |
PR2521: configurable debuginfo search path
2008-01-23 Frank Ch. Eigler <fche@elastic.org>
PR 2151
* tapsets.cxx (dwflpp::setup): Parametrize debuginfo_path.
* stap.1.in: Document this.
PR 2521.
* systemtap.base/debugpath.exp: New test.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | stap.1.in | 9 | ||||
-rw-r--r-- | tapsets.cxx | 5 | ||||
-rw-r--r-- | testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | testsuite/systemtap.base/debugpath.exp | 18 |
5 files changed, 41 insertions, 2 deletions
@@ -15,6 +15,12 @@ variables without indices. (c_unparser::emit_module_exit): Likewise. +2008-01-23 Frank Ch. Eigler <fche@elastic.org> + + PR 2151 + * tapsets.cxx (dwflpp::setup): Parametrize debuginfo_path. + * stap.1.in: Document this. + 2008-01-22 Jim Keniston <jkenisto@us.ibm.com> * runtime/uprobes/uprobes.c: Fix from Srinivasa: Recast @@ -932,7 +932,14 @@ The location of kernel module building infrastructure. @prefix@/lib/debug/lib/modules/VERSION The location of kernel debugging information when packaged into the .IR kernel\-debuginfo -RPM. +RPM, unless overridden by the +.I SYSTEMTAP_DEBUGINFO_PATH +environment variable. The default value for this variable is +.IR \-:.debug:/usr/lib/debug . +This path is interpreted by elfutils as a list of base directories of +which various subdirectories will be searched. The \- at the front +means to skip CRC matching for separated debug objects and is a small +performance win if no possible corruption is suspected. .TP @prefix@/bin/staprun The auxiliary program supervising module loading, interaction, and diff --git a/tapsets.cxx b/tapsets.cxx index 937f34b3..06aa73aa 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -716,7 +716,10 @@ struct dwflpp { // XXX: this is where the session -R parameter could come in static char debuginfo_path_arr[] = "-:.debug:/usr/lib/debug"; - static char *debuginfo_path = debuginfo_path_arr; + static char *debuginfo_env_arr = getenv("SYSTEMTAP_DEBUGINFO_PATH"); + + static char *debuginfo_path = (debuginfo_env_arr ? + debuginfo_env_arr : debuginfo_path_arr); static const Dwfl_Callbacks proc_callbacks = { diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index e13092ac..6d3bf44d 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-01-23 Frank Ch. Eigler <fche@elastic.org> + + PR 2521. + * systemtap.base/debugpath.exp: New test. + 2008-01-18 Frank Ch. Eigler <fche@elastic.org> * configure.ac: Bump version to 0.6.1. diff --git a/testsuite/systemtap.base/debugpath.exp b/testsuite/systemtap.base/debugpath.exp new file mode 100644 index 00000000..67b9eb70 --- /dev/null +++ b/testsuite/systemtap.base/debugpath.exp @@ -0,0 +1,18 @@ + +set test "debugpath-bad" +spawn env SYSTEMTAP_DEBUGINFO_PATH=/dev/null stap -e "probe kernel.function(\"sys_open\") {}" -p4 +expect { + -re {^semantic error:.*missing.*debuginfo} { pass $test } + timeout { fail "$test (timeout1)" } + eof { fail "$test (eof)" } +} +catch { close; wait } + +set test "debugpath-good" +spawn env SYSTEMTAP_DEBUGINFO_PATH=:/usr/lib/debug stap -e "probe kernel.function(\"sys_open\") {}" -p2 +expect { + -re {kernel.function.*pc=} { pass $test } + timeout { fail "$test (timeout2)" } + eof { fail "$test (eof)" } +} +catch { close ; wait } |