From 7471ea1f77971b814bc366a3e09d99aaddcfb0f7 Mon Sep 17 00:00:00 2001 From: Rajan Arora Date: Mon, 1 Dec 2008 02:06:51 -0500 Subject: BZ 5892: Add stap -B to sic systemtap at an alternate kernel build tree --- translate.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'translate.cxx') 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 = -- cgit