[binutils-gdb] [gdb/testsuite] Simplify regexp in gdb.rocm/watchpoint-at-end-of-shader.exp

Tom de Vries 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=af9387222dcb66e656807eb331c7f7d61b6b2af6

commit af9387222dcb66e656807eb331c7f7d61b6b2af6
Author: Tom de Vries <[email protected]>
Date:   Wed Aug 19 10:29:09 2026 +0200

    [gdb/testsuite] Simplify regexp in gdb.rocm/watchpoint-at-end-of-shader.exp
    
    In gdb.rocm/watchpoint-at-end-of-shader.exp, we have:
    ...
                [multi_line "Switching to \[^\r\n\]+(?=\r\n)" \
                    "" \
    ...
    
    This expands to "Switching to \[^\r\n\]+(?=\r\n)\r\n".
    
    The lookahead '(?=\r\n)' is superfluous (because it's followed by '\r\n'), so
    drop it.
    
    While we're at it, reduce escaping by using {}.

Diff:
---
 gdb/testsuite/gdb.rocm/watchpoint-at-end-of-shader.exp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.rocm/watchpoint-at-end-of-shader.exp b/gdb/testsuite/gdb.rocm/watchpoint-at-end-of-shader.exp
index 2ae0e044a53..298b5be9461 100644
--- a/gdb/testsuite/gdb.rocm/watchpoint-at-end-of-shader.exp
+++ b/gdb/testsuite/gdb.rocm/watchpoint-at-end-of-shader.exp
@@ -71,7 +71,8 @@ proc do_test {precise_memory has_xfail} {
 	    setup_xfail "*-*-*"
 	}
 	gdb_test "continue" \
-	    [multi_line "Switching to \[^\r\n\]+(?=\r\n)" \
+	    [multi_line \
+		{Switching to [^\r\n]+} \
 		"" \
 		"Thread $::decimal \[^\r\n\]*hit Hardware watchpoint $::decimal: -location \\*v" \
 		"" \
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.