gdb/testsuite: use 'end' at the end of python blocks
authorAndrew Burgess <aburgess@redhat.com>
Sat, 8 Oct 2022 15:58:00 +0000 (16:58 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Mon, 10 Oct 2022 09:23:59 +0000 (10:23 +0100)
Within the testsuite, use the keyword 'end' to terminate blocks of
Python code being sent to GDB, rather than sending \004.  I could only
find three instances of this, all in tests that I originally wrote.  I
have no memory of there being any special reason why I used \004
instead of 'end' - I assume I copied this from somewhere else that has
since changed.

Non of the tests being changed here are specifically about whether
\004 can be used to terminate a Python block, so I think switching to
the more standard 'end' keyword is the right choice.

gdb/testsuite/gdb.base/style.exp
gdb/testsuite/gdb.python/py-arch-reg-groups.exp
gdb/testsuite/gdb.python/py-arch-reg-names.exp

index c6ed996c280996faeb76c429252d9b1544b50131..146e2b6d757a0707d09833cd04762f772d405480 100644 (file)
@@ -444,7 +444,7 @@ proc test_disassembler_error_handling { } {
                 "def replacement_colorize_disasm(content,gdbarch):" \
                 "  return None" \
                 "gdb.styling.colorize_disasm = replacement_colorize_disasm" \
-                "\004"] \
+                "end"] \
            "setup replacement colorize_disasm function" \
            true
 
index 9503e6c10f531084f41b1a2b8fd4fc4c8789d4a6..f2cf8b0e6eccba36f4d0401ab47f4fac55f99692 100644 (file)
@@ -102,5 +102,5 @@ gdb_py_test_silent_cmd \
         "    raise gdb.GdbError (\"miss-matched names\")" \
         "  if (r1 != r2):" \
         "    raise gdb.GdbError (\"miss-matched objects\")" \
-        "\004" ] \
+        "end" ] \
     "check names and objects match" 1
index d3c600ffc0f3bc7b4cbbd7185469441f6f6f0164..62c47e8200efa4b27118706748030c16a80603e2 100644 (file)
@@ -102,7 +102,7 @@ gdb_py_test_silent_cmd \
         "    raise gdb.GdbError (\"miss-matched names\")" \
         "  if (r1 != r2):" \
         "    raise gdb.GdbError (\"miss-matched objects\")" \
-        "\004" ] \
+        "end" ] \
     "check names and objects match" 1
 
 # Ensure that the '.find' method on the iterator returns the same