From 721db7bd56d803bce2257da677c6c48c97a4115f Mon Sep 17 00:00:00 2001 From: Thiago Jung Bauermann Date: Sun, 26 Apr 2026 01:15:00 -0300 Subject: [PATCH] GDB: testsuite: Fix proc return value in gdb.python/py-prettyprint.exp The callers of the procedure run_lang_tests expect it to return -1 in case of error but in the case where runto_main fails, it will return without any value. Make it return -1 in that case as well. Found by code inspection. Approved-By: Tom Tromey --- gdb/testsuite/gdb.python/py-prettyprint.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.python/py-prettyprint.exp b/gdb/testsuite/gdb.python/py-prettyprint.exp index ca189a40329..ab31928fa77 100644 --- a/gdb/testsuite/gdb.python/py-prettyprint.exp +++ b/gdb/testsuite/gdb.python/py-prettyprint.exp @@ -40,7 +40,7 @@ proc run_lang_tests {exefile lang} { gdb_load $exefile if {![runto_main]} { - return + return -1 } gdb_test_no_output "set print pretty on" -- 2.47.3