summaryrefslogtreecommitdiffstats
path: root/scripts/gdb
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2021-05-07 03:05:03 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2021-05-07 09:26:32 +0200
commit23921540d2c0a4d8530078f6f64fc3e28444ca9d (patch)
tree76d641d1ddcae873aacd3f25dcab5623bd9506da /scripts/gdb
parentdelayacct: clear right task's flag after blkio completes (diff)
downloadlinux-23921540d2c0a4d8530078f6f64fc3e28444ca9d.tar.xz
linux-23921540d2c0a4d8530078f6f64fc3e28444ca9d.zip
gdb: lx-symbols: store the abspath()
If we store the relative path, the user might later cd to a different directory, and that would break the automatic symbol resolving that happens when a module is loaded into the target kernel. Fix this by storing the abspath() of each path given, just like we already do for the cwd (os.getcwd() is absolute.) Link: https://lkml.kernel.org/r/20201217091747.bf4332cf2b35.I10ebbdb7e9b80ab1a5cddebf53d073be8232d656@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com> Cc: Kieran Bingham <kbingham@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/gdb')
-rw-r--r--scripts/gdb/linux/symbols.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/gdb/linux/symbols.py b/scripts/gdb/linux/symbols.py
index 1be9763cf8bb..08d264ac328b 100644
--- a/scripts/gdb/linux/symbols.py
+++ b/scripts/gdb/linux/symbols.py
@@ -164,7 +164,8 @@ lx-symbols command."""
saved_state['breakpoint'].enabled = saved_state['enabled']
def invoke(self, arg, from_tty):
- self.module_paths = [os.path.expanduser(p) for p in arg.split()]
+ self.module_paths = [os.path.abspath(os.path.expanduser(p))
+ for p in arg.split()]
self.module_paths.append(os.getcwd())
# enforce update