summaryrefslogtreecommitdiffstats
path: root/translate.cxx
diff options
context:
space:
mode:
authorRajan Arora <rarora@redhat.com>2008-12-01 02:06:51 -0500
committerRajan Arora <rarora@redhat.com>2008-12-01 02:10:48 -0500
commit7471ea1f77971b814bc366a3e09d99aaddcfb0f7 (patch)
treec155f76087281c1f5603f40c0a44a4c3911e1c87 /translate.cxx
parent4ea5a9d947ac41fc9da143ce501642673d27c7bf (diff)
downloadsystemtap-steved-7471ea1f77971b814bc366a3e09d99aaddcfb0f7.tar.gz
systemtap-steved-7471ea1f77971b814bc366a3e09d99aaddcfb0f7.tar.xz
systemtap-steved-7471ea1f77971b814bc366a3e09d99aaddcfb0f7.zip
BZ 5892: Add stap -B to sic systemtap at an alternate kernel build tree
Diffstat (limited to 'translate.cxx')
-rw-r--r--translate.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/translate.cxx b/translate.cxx
index b90bb5ab..dc9f12bc 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -4710,9 +4710,11 @@ emit_symbol_data (systemtap_session& s)
static char *debuginfo_env_arr = getenv("SYSTEMTAP_DEBUGINFO_PATH");
static char *debuginfo_path = (debuginfo_env_arr ?
- debuginfo_env_arr : debuginfo_path_arr);
- static const char *debug_path = (debuginfo_env_arr ?
- debuginfo_env_arr : s.kernel_release.c_str());
+ debuginfo_env_arr : s.kernel_build_tree.size () ?
+ (char *) s.kernel_build_tree.c_str() : debuginfo_path_arr);
+ static const char *debug_path = (debuginfo_env_arr ?
+ debuginfo_env_arr : s.kernel_build_tree.size () ?
+ s.kernel_build_tree.c_str() : s.kernel_release.c_str());
// ---- step 1: process any kernel modules listed
static const Dwfl_Callbacks kernel_callbacks =