Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | From 436063d5e4738a9b03535d330a2242be5118e745 Mon Sep 17 00:00:00 2001 |
| 2 | From: David Smith <dsmith@redhat.com> |
| 3 | Date: Thu, 8 Mar 2018 16:01:58 -0600 |
| 4 | Subject: [PATCH] Use sysroot when looking for the System.map file. |
| 5 | |
| 6 | Add sysroot to system_map_path + "/boot/System.map" case. Otherwise |
| 7 | stap tries to look symbols on host system and it produce error like this: |
| 8 | |
| 9 | > Kernel symbol table /boot/System.map-4.9.78-yocto-standard unavailable, (No such file or directory) |
| 10 | |
| 11 | Upstream-Status: Backport |
| 12 | Signed-off-by: Victor Kamensky <kamensky@cisco.com> |
| 13 | --- |
| 14 | session.cxx | 2 +- |
| 15 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 16 | |
| 17 | Index: git/session.cxx |
| 18 | =================================================================== |
| 19 | --- git.orig/session.cxx |
| 20 | +++ git/session.cxx |
| 21 | @@ -2013,7 +2013,7 @@ systemtap_session::parse_kernel_function |
| 22 | clog << _F("Kernel symbol table %s unavailable, (%s)", |
| 23 | system_map_path.c_str(), strerror(errno)) << endl; |
| 24 | |
| 25 | - system_map_path = "/boot/System.map-" + kernel_release; |
| 26 | + system_map_path = sysroot + "/boot/System.map-" + kernel_release; |
| 27 | system_map.clear(); |
| 28 | system_map.open(system_map_path.c_str(), ifstream::in); |
| 29 | if (! system_map.is_open()) |