Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / tools / lldb-server / TestGdbRemoteModuleInfo.py
blob3fbf62ca638221c28556b32e88340a3c1790a31c
1 import json
2 import gdbremote_testcase
3 import lldbgdbserverutils
4 from lldbsuite.support import seven
5 from lldbsuite.test.decorators import *
6 from lldbsuite.test.lldbtest import *
7 from lldbsuite.test import lldbutil
10 class TestGdbRemoteModuleInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
11 @add_test_categories(["llgs"])
12 def test_module_info(self):
13 self.build()
14 self.set_inferior_startup_launch()
15 procs = self.prep_debug_monitor_and_inferior()
16 self.add_process_info_collection_packets()
17 context = self.expect_gdbremote_sequence()
18 info = self.parse_process_info_response(context)
20 self.test_sequence.add_log_lines(
22 "read packet: $jModulesInfo:%s]#00"
23 % json.dumps(
26 "file": lldbutil.append_to_process_working_directory(
27 self, "a.out"
29 "triple": seven.unhexlify(info["triple"]),
34 "direction": "send",
35 "regex": r"^\$\[{(.*)}\]\]#[0-9A-Fa-f]{2}",
36 "capture": {1: "spec"},
39 True,
42 context = self.expect_gdbremote_sequence()
43 spec = context.get("spec")
44 self.assertRegexpMatches(spec, '"file_path":".*"')
45 self.assertRegexpMatches(spec, '"file_offset":\d+')
46 self.assertRegexpMatches(spec, '"file_size":\d+')
47 self.assertRegexpMatches(spec, '"triple":"\w*-\w*-.*"')
48 self.assertRegexpMatches(spec, '"uuid":"[A-Fa-f0-9]+"')