[1/2] gdb/testsuite: avoid {"} pattern in lib/mi-support.exp

Message ID 8698a0544ca9c9441a4dc0c459ca3944532140ba.1681211875.git.aburgess@redhat.com
State New
Headers
Series testsuite: small tweaks to MI testing |

Commit Message

Andrew Burgess April 11, 2023, 11:19 a.m. UTC
  Commit:

  commit c569a946f6925d3f210c3eaf74dcda56843350ef
  Date:   Fri Mar 24 10:45:37 2023 +0100

      [gdb/testsuite] Fix unbalanced quotes in mi_expect_stop argument

Introduced the use of {"} in mi-support.exp.  There is absolutely
nothing wrong with this in any way.  However, this is causing my
editor to get the syntax highlighting of this file wrong after this
point.

Maybe the real answer is to use a better editor, or fix my current
editor.... but I'm hoping I can instead take the lazy approach of just
changing {"} to "\"", which is handled fine, and means exactly the
same as far as I understand it.

There should be no change in what is tested after this commit.
---
 gdb/testsuite/lib/mi-support.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Tom Tromey April 13, 2023, 1:42 p.m. UTC | #1
>>>>> "Andrew" == Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org> writes:

Andrew> Maybe the real answer is to use a better editor, or fix my current
Andrew> editor.... but I'm hoping I can instead take the lazy approach of just
Andrew> changing {"} to "\"", which is handled fine, and means exactly the
Andrew> same as far as I understand it.

Andrew> There should be no change in what is tested after this commit.

This seems totally fine to me.
I've also made changes just to make Emacs happy.

Reviewed-By: Tom Tromey <tom@tromey.com>

Tom
  

Patch

diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index 1841816ffeb..52c188df49d 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -1271,7 +1271,7 @@  proc mi_expect_stop { reason func args file line extra test } {
 
     set r ""
     if { $reason != "" } {
-	if { [regexp {"} $reason] } {
+	if { [regexp "\"" $reason] } {
 	   set r "reason=$reason,"
 	} else {
 	   set r "reason=\"$reason\","