From df932a3175284fa75a4c6bdb3aa7af1a34c15cd6 Mon Sep 17 00:00:00 2001 From: Torsten Polle Date: Thu, 6 Mar 2014 21:38:49 +0100 Subject: [PATCH] Fix: Debug links are not found if the sysroot is used. Signed-off-by: Torsten Polle --- setupdwfl.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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, -- 2.43.5