]> git.proxmox.com Git - mirror_qemu.git/blob - tests/tcg/multiarch/gdbstub/test-proc-mappings.py
Merge tag 'qga-pull-2024-01-30' of https://github.com/kostyanf14/qemu into staging
[mirror_qemu.git] / tests / tcg / multiarch / gdbstub / test-proc-mappings.py
1 """Test that gdbstub has access to proc mappings.
2
3 This runs as a sourced script (via -x, via run-test.py)."""
4 from __future__ import print_function
5 import gdb
6 from test_gdbstub import main, report
7
8
9 def run_test():
10 """Run through the tests one by one"""
11 try:
12 mappings = gdb.execute("info proc mappings", False, True)
13 except gdb.error as exc:
14 exc_str = str(exc)
15 if "Not supported on this target." in exc_str:
16 # Detect failures due to an outstanding issue with how GDB handles
17 # the x86_64 QEMU's target.xml, which does not contain the
18 # definition of orig_rax. Skip the test in this case.
19 print("SKIP: {}".format(exc_str))
20 return
21 raise
22 report(isinstance(mappings, str), "Fetched the mappings from the inferior")
23 # Broken with host page size > guest page size
24 # report("/sha1" in mappings, "Found the test binary name in the mappings")
25
26
27 main(run_test)