Skip to content

Commit

Permalink
tests/tcg: relax the next step precision of the gdb sha1 test
Browse files Browse the repository at this point in the history
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 <alex.bennee@linaro.org>
Tested-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210401102530.12030-8-alex.bennee@linaro.org>
  • Loading branch information
stsquad committed Apr 6, 2021
1 parent 631f112 commit 1cb8d12
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/tcg/multiarch/gdbstub/sha1.py
Expand Up @@ -40,7 +40,10 @@ def run_test():

check_break("SHA1Init")

# 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")
gdb.execute("next")
val_ctx = gdb.parse_and_eval("context->state[0]")
exp_ctx = 0x67452301
Expand Down

0 comments on commit 1cb8d12

Please sign in to comment.