1 From b29e448e12040ed8f4d83743a14db0f138a7cc67 Mon Sep 17 00:00:00 2001
2 From: Victor Kamensky <kamensky@cisco.com>
3 Date: Wed, 14 Mar 2018 16:54:08 -0500
4 Subject: [PATCH] debuginfo lookup with sysroot case do not remove sysroot from
7 If sysroot option is passed, and debug symbols reside in sysroot along
8 with executable <foo> in <foo_dir>/.debug/<foo_file> directory,
9 stap fails to find debuginfo because it strips out sysroot path
10 from file_name so dwfl_standard_find_debuginfo ends up looking at
11 host <foo_dir>/.debug/<foo_file> rather then checking
12 <sysroot>/<foo_dir>/.debug/<foo_file>.
14 Upstream-Status: Backport
15 Signed-off-by: Victor Kamensky <kamensky@cisco.com>
17 setupdwfl.cxx | 12 ------------
18 1 file changed, 12 deletions(-)
20 diff --git a/setupdwfl.cxx b/setupdwfl.cxx
21 index 11e0bb2..2a87982 100644
24 @@ -627,18 +627,6 @@ internal_find_debuginfo (Dwfl_Module *mod,
26 call_dwfl_standard_find_debuginfo:
28 - if (current_session_for_find_debuginfo)
30 - string sysroot = current_session_for_find_debuginfo->sysroot + "/*";
31 - int found = fnmatch(sysroot.c_str(), file_name, 0);
35 - file_name = file_name
36 - + current_session_for_find_debuginfo->sysroot.length() - 1;
40 /* Call the original dwfl_standard_find_debuginfo */
41 return dwfl_standard_find_debuginfo(mod, userdata, modname, base,
42 file_name, debuglink_file,