diff options
authorJohannes Berg <>2021-05-06 18:05:03 -0700
committerLinus Torvalds <>2021-05-07 00:26:32 -0700
commit23921540d2c0a4d8530078f6f64fc3e28444ca9d (patch)
parent3d1c7fd97e4c5e54034231cd11319079dfaed60e (diff)
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: Signed-off-by: Johannes Berg <> Reviewed-by: Jan Kiszka <> Cc: Kieran Bingham <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/gdb/linux/ b/scripts/gdb/linux/
index 1be9763cf8bb..08d264ac328b 100644
--- a/scripts/gdb/linux/
+++ b/scripts/gdb/linux/
@@ -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()]
# enforce update