[binutils-gdb] GDB: testsuite: Fix proc return value in gdb.python/py-prettyprint.exp

Thiago Bauermann via Gdb-cvs <[email protected]>
Newsgroups gmane.comp.gdb.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=721db7bd56d803bce2257da677c6c48c97a4115f

commit 721db7bd56d803bce2257da677c6c48c97a4115f
Author: Thiago Jung Bauermann <[email protected]>
Date:   Sun Apr 26 01:15:00 2026 -0300

    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 <[email protected]>

Diff:
---
 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"
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.