Skip to contentSkip to conversation

scripts: gdb: fix missing pbl_barebox_break error message

PATCH Applied Michael Tretter 2 participants 2 messages Aug 17 – Aug 19 GDB kernel debugging helper scripts

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts: gdb: fix missing pbl_barebox_break error message

From: Bruno Knittel <[email protected]>

If no pbl_barebox_break symbol is found in the file provided to bb-load-symbols, the script is failing with a Python exception stating that BBSymbols has no path attribute.

Fix the error handling to actually print the error message.

---
 scripts/gdb/helper.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/gdb/helper.py +1 -1
index 40417898902e..e92b1fe65a57 100644
@@ -33,7 +33,7 @@ class BBSymbols(gdb.Command):
         symbol = section.get_symbol_by_name("pbl_barebox_break")
         if not symbol:
             gdb.write("Symbol pbl_barebox_break in section {} in file {} not found\n"
-                      .format(section.name, self.path), gdb.STDERR)
+                      .format(section.name, path), gdb.STDERR)
             return
         symbol = symbol[0]
         pc = gdb.parse_and_eval("$pc")

---
base-commit: 3317ac1baff3b0226caba7f83f3da61bc407343a
change-id: 20260817-fix-gdb-script-error-message-2b213a0644c3

Best regards,

Signature · 1 line
Michael Tretter <[email protected]>
Applied
#1 lore raw
Quoted 8 lines · Michael Tretter

If no pbl_barebox_break symbol is found in the file provided to bb-load-symbols, the script is failing with a Python exception stating that BBSymbols has no path attribute.

Fix the error handling to actually print the error message.

[...]

Applied, thanks!

[1/1] scripts: gdb: fix missing pbl_barebox_break error message

      https://git.pengutronix.de/cgit/barebox/commit/?id=44012c886e94 (link may not be stable)

Best regards,

Signature · 1 line
Sascha Hauer <[email protected]>