[PATCH] scripts/gdb/symbols: handle module path parameters

From: Benjamin Berg

Date: Wed Mar 04 2026 - 06:09:31 EST


From: Benjamin Berg <benjamin.berg@xxxxxxxxx>

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 <iii@xxxxxxxxxxxxx>
Signed-off-by: Benjamin Berg <benjamin.berg@xxxxxxxxx>
Reviewed-by: Johannes Berg <johannes.berg@xxxxxxxxx>
---
scripts/gdb/linux/symbols.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gdb/linux/symbols.py b/scripts/gdb/linux/symbols.py
index d4308b726183..943ff1228b48 100644
--- a/scripts/gdb/linux/symbols.py
+++ b/scripts/gdb/linux/symbols.py
@@ -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:
--
2.53.0