From: Torsten Polle Date: Thu, 6 Mar 2014 20:38:49 +0000 (+0100) Subject: Fix: Debug links are not found if the sysroot is used. X-Git-Tag: release-3.1~756^2~4 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=df932a3175284fa75a4c6bdb3aa7af1a34c15cd6;p=systemtap.git Fix: Debug links are not found if the sysroot is used. Signed-off-by: Torsten Polle --- diff --git a/setupdwfl.cxx b/setupdwfl.cxx index 33239fe67..c60d60807 100644 --- a/setupdwfl.cxx +++ b/setupdwfl.cxx @@ -627,6 +627,18 @@ internal_find_debuginfo (Dwfl_Module *mod, call_dwfl_standard_find_debuginfo: + if (current_session_for_find_debuginfo) + { + string sysroot = current_session_for_find_debuginfo->sysroot + "/*"; + int found = fnmatch(sysroot.c_str(), file_name, 0); + + if (found) + { + file_name = file_name + + current_session_for_find_debuginfo->sysroot.length() - 1; + } + } + /* Call the original dwfl_standard_find_debuginfo */ return dwfl_standard_find_debuginfo(mod, userdata, modname, base, file_name, debuglink_file,