]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
tests/tcg: better detect confused gdb which can't connect
authorAlex Bennée <alex.bennee@linaro.org>
Wed, 20 May 2020 14:05:33 +0000 (15:05 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Wed, 27 May 2020 13:26:49 +0000 (14:26 +0100)
While we may gamely give the right information it can still confuse
the wide range of GDBs out there. For example ppc64abi32-linux-user
reports:

  warning: Selected architecture powerpc:common is not compatible with reported target architecture powerpc:common64
  warning: Architecture rejected target-supplied description

but still connects. Add a test for a 0 pc and exit early if that is
the case. This may actually be a bug we need to fix?

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200520140541.30256-8-alex.bennee@linaro.org>

tests/tcg/multiarch/gdbstub/sha1.py

index 734553b98bbce9cda93884403d981d1889edd093..2bfde49633cf290112955809295e020da1a1b604 100644 (file)
@@ -65,6 +65,10 @@ except (gdb.error, AttributeError):
     print("SKIPPING (not connected)", file=sys.stderr)
     exit(0)
 
+if gdb.parse_and_eval('$pc') == 0:
+    print("SKIP: PC not set")
+    exit(0)
+
 try:
     # These are not very useful in scripts
     gdb.execute("set pagination off")