]>
Commit | Line | Data |
---|---|---|
a6341482 IL |
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 | |
4d48c1bc | 6 | from test_gdbstub import main, report |
a6341482 IL |
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") | |
1b65895d RH |
23 | # Broken with host page size > guest page size |
24 | # report("/sha1" in mappings, "Found the test binary name in the mappings") | |
a6341482 IL |
25 | |
26 | ||
4d48c1bc | 27 | main(run_test) |