[binutils-gdb] Handle missing catchpoint support in gdb.base/break.exp [PR34535]

Rainer Orth 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=a272c3ed7b716cd656a180e4af010b3a26fc9cd2

commit a272c3ed7b716cd656a180e4af010b3a26fc9cd2
Author: Rainer Orth <[email protected]>
Date:   Fri Aug 28 09:12:01 2026 +0200

    Handle missing catchpoint support in gdb.base/break.exp [PR34535]
    
    As detailed in PR testsuite/34535, the gdb.base/break.exp test FAILs
    on Solaris:
    
    FAIL: gdb.base/break.exp: test_no_break_on_catchpoint: continue until exit (the program exited)
    
    warning: Error inserting catchpoint 2: Your system does not support this type of catchpoint.
    warning: Error inserting catchpoint 3: Your system does not support this type of catchpoint.
    warning: Error inserting catchpoint 4: Your system does not support this type of catchpoint.
    
    This patch handles that condition.
    
    Tested on x86_64-pc-solaris2.11, sparcv9-sun-solaris2.11, and
    x86_64-pc-linux-gnu.
    
    Approved-By: Tom Tromey <[email protected]>
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34535

Diff:
---
 gdb/testsuite/gdb.base/break.exp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp
index 2f5fa3d8e59..7ebce65bf4c 100644
--- a/gdb/testsuite/gdb.base/break.exp
+++ b/gdb/testsuite/gdb.base/break.exp
@@ -471,7 +471,14 @@ proc_with_prefix test_no_break_on_catchpoint {} {
     gdb_test "catch exec" "Catchpoint ${::decimal} \\(exec\\)" \
 	"set catch exec, never expected to trigger"
 
-    gdb_continue_to_end
+    gdb_test_multiple "continue" "" {
+	-re "Your system does not support this type.*" {
+	    unsupported "target does not support this type of catchpoint"
+	}
+	-re "Continuing." {
+	    pass "continue until exit"
+	}
+    }
 }
 
 test_no_break_on_catchpoint
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.