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

Tom de Vries <[email protected]>
Newsgroups gmane.comp.gdb.patches
Message-ID <[email protected]>
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 {}.
---
 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" \
 		"" \

base-commit: ab1830f633107b180b46938003e6f49fb44cb17d
-- 
2.51.0
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.