From 0dc343224e63d8c6f2ba4f0688c93c8c9b5781b6 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Fri, 5 Dec 2008 11:33:58 -0500 Subject: turn on elfutils-level debuginfo<->stripped-binary checksum matching This is necessary to detect mismatching debuginfo for user-space programs without build-id. We don't have run-time version assertions for user-space binaries. --- ChangeLog | 6 ++++++ stap.1.in | 2 +- tapsets.cxx | 4 ++-- translate.cxx | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index a786c45d..9b311816 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-12-05 Frank Ch. Eigler + + * tapsets.cxx, translate.cxx: Set default elfutils debuginfo_path + to start with "+", to enable debuginfo<->stripped checksum checking. + * stap.1.in: Note this. + 2008-12-03 Frank Ch. Eigler PR6925 diff --git a/stap.1.in b/stap.1.in index d4f8946a..0b6da64c 100644 --- a/stap.1.in +++ b/stap.1.in @@ -1123,7 +1123,7 @@ The location of kernel debugging information when packaged into the RPM, unless overridden by the .I SYSTEMTAP_DEBUGINFO_PATH environment variable. The default value for this variable is -.IR \-:.debug:/usr/lib/debug . +.IR \+:.debug:/usr/lib/debug . Elfutils searches vmlinux in this path and it interprets the path as a base directory of which various subdirectories will be searched for finding modules. .TP diff --git a/tapsets.cxx b/tapsets.cxx index 178d2465..d49ea39d 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -895,7 +895,7 @@ struct dwflpp if (! sess.module_cache) sess.module_cache = new module_cache (); - static const char *debuginfo_path_arr = "-:.debug:/usr/lib/debug:build"; + static const char *debuginfo_path_arr = "+:.debug:/usr/lib/debug:build"; static const char *debuginfo_env_arr = getenv("SYSTEMTAP_DEBUGINFO_PATH"); static const char *debuginfo_path = (debuginfo_env_arr ?: debuginfo_path_arr ); @@ -957,7 +957,7 @@ struct dwflpp void setup_user(string module_name, bool debuginfo_needed = true) { - static const char *debuginfo_path_arr = "-:.debug:/usr/lib/debug:build"; + static const char *debuginfo_path_arr = "+:.debug:/usr/lib/debug:build"; static const char *debuginfo_env_arr = getenv("SYSTEMTAP_DEBUGINFO_PATH"); // NB: kernel_build_tree doesn't enter into this, as it's for // kernel-side modules only. diff --git a/translate.cxx b/translate.cxx index 12d50617..2fa402d7 100644 --- a/translate.cxx +++ b/translate.cxx @@ -4706,7 +4706,7 @@ emit_symbol_data (systemtap_session& s) unwindsym_dump_context ctx = { s, kallsyms_out, 0, s.unwindsym_modules }; // XXX: copied from tapsets.cxx dwflpp::, sadly - static const char *debuginfo_path_arr = "-:.debug:/usr/lib/debug:build"; + static const char *debuginfo_path_arr = "+:.debug:/usr/lib/debug:build"; static const char *debuginfo_env_arr = getenv("SYSTEMTAP_DEBUGINFO_PATH"); static const char *debuginfo_path = (debuginfo_env_arr ?: debuginfo_path_arr); -- cgit