aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2020-05-20 15:05:33 +0100
committerAlex Bennée <alex.bennee@linaro.org>2020-05-27 14:26:49 +0100
commit8ec6f3315118ef75d37e9433dc8faa8383130fb6 (patch)
tree33d0ac96670fe4ea5d7115929515c5e3c52b7176 /tests
parent8281a157c5d01c08e1d684bf7a28c3e2bebf1a96 (diff)
downloadqemu-8ec6f3315118ef75d37e9433dc8faa8383130fb6.zip
qemu-8ec6f3315118ef75d37e9433dc8faa8383130fb6.tar.gz
qemu-8ec6f3315118ef75d37e9433dc8faa8383130fb6.tar.bz2
tests/tcg: better detect confused gdb which can't connect
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/tcg/multiarch/gdbstub/sha1.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/tcg/multiarch/gdbstub/sha1.py b/tests/tcg/multiarch/gdbstub/sha1.py
index 734553b..2bfde49 100644
--- a/tests/tcg/multiarch/gdbstub/sha1.py
+++ b/tests/tcg/multiarch/gdbstub/sha1.py
@@ -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")