Commit 1cb8d12f79 for

commit 1cb8d12f79a6d063455eb43ddf3f2855932b5384
Author: Alex Bennée <>
Date:   Thu Apr 1 11:25:26 2021 +0100

    tests/tcg: relax the next step precision of the gdb sha1 test

    Depending on the version of gdb we may not execute the first line of
    SHA1Init when executing the first "next" command - instead just
    stepping over the preamble. As we don't actually care about the
    position of the PC after the steps and want to be sure the
    context->state[] has been loaded before we inspect it do a double next
    at the start.

    Signed-off-by: Alex Bennée <>
    Tested-by: Richard Henderson <>
    Message-Id: <>

diff --git a/tests/tcg/multiarch/gdbstub/ b/tests/tcg/multiarch/gdbstub/
index 2bfde49633..423b720e6d 100644
--- a/tests/tcg/multiarch/gdbstub/
+++ b/tests/tcg/multiarch/gdbstub/
@@ -40,7 +40,10 @@ def run_test():


-    # check step and inspect values
+    # Check step and inspect values. We do a double next after the
+    # breakpoint as depending on the version of gdb we may step the
+    # preamble and not the first actual line of source.
+    gdb.execute("next")
     val_ctx = gdb.parse_and_eval("context->state[0]")
     exp_ctx = 0x67452301