[PATCH] scripts: gdb: fix missing pbl_barebox_break error message

Michael Tretter <[email protected]>
Newsgroups org.infradead.lists.barebox
Message-ID <20260817-fix-gdb-script-error-message-v1-1-4ebbaff5c131@pengutronix.de>
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.

Signed-off-by: Bruno Knittel <[email protected]>
Signed-off-by: Michael Tretter <[email protected]>
---
 scripts/gdb/helper.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gdb/helper.py b/scripts/gdb/helper.py
index 40417898902e..e92b1fe65a57 100644
--- a/scripts/gdb/helper.py
+++ b/scripts/gdb/helper.py
@@ -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,
-- 
Michael Tretter <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.