Skip to contentSkip to conversation

scripts/gdb/symbols: handle module path parameters

PATCH Applied Benjamin Berg 1 participant 1 message Mar 4 GDB kernel debugging helper scripts

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/gdb/symbols: handle module path parameters

From: Benjamin Berg <[email protected]>

The commit 581ee79a2547 ("scripts/gdb/symbols: make BPF debug info available to GDB") added support to make BPF debug information available to GDB. However, the argument handling loop was slightly broken, causing it to fail if further modules were passed. Fix it to append these passed modules to the instance variable after expansion.

Fixes 581ee79a2547 ("scripts/gdb/symbols: make BPF debug info available to GDB")
CC Ilya Leoshkevich <[email protected]>
---
 scripts/gdb/linux/symbols.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/gdb/linux/symbols.py +1 -1
index d4308b726183..943ff1228b48 100644
@@ -298,7 +298,7 @@ are loaded as well."""
             if p == "-bpf":
                 monitor_bpf = True
             else:
-                p.append(os.path.abspath(os.path.expanduser(p)))
+                self.module_paths.append(os.path.abspath(os.path.expanduser(p)))
         self.module_paths.append(os.getcwd())
 
         if self.breakpoint is not None:
Signature · 1 line
2.53.0