Differential D56233 Diff 194380 packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteModuleInfo.py
Changeset View
Changeset View
Standalone View
Standalone View
packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteModuleInfo.py
Show All 13 Lines | class TestGdbRemoteModuleInfo(gdbremote_testcase.GdbRemoteTestCaseBase): | ||||
mydir = TestBase.compute_mydir(__file__) | mydir = TestBase.compute_mydir(__file__) | ||||
def module_info(self): | def module_info(self): | ||||
procs = self.prep_debug_monitor_and_inferior() | procs = self.prep_debug_monitor_and_inferior() | ||||
self.add_process_info_collection_packets() | self.add_process_info_collection_packets() | ||||
context = self.expect_gdbremote_sequence() | context = self.expect_gdbremote_sequence() | ||||
info = self.parse_process_info_response(context) | info = self.parse_process_info_response(context) | ||||
module_path = lldbutil.append_to_process_working_directory(self, "a.out") | |||||
# Replace path separators in the json string either with "\\\\" or "/" on Windows. | |||||
triple = self.dbg.GetSelectedPlatform().GetTriple() | |||||
if re.match(".*-.*-windows", triple): | |||||
module_path = module_path.replace(os.path.sep, '/') | |||||
self.test_sequence.add_log_lines([ | self.test_sequence.add_log_lines([ | ||||
'read packet: $jModulesInfo:[{"file":"%s","triple":"%s"}]]#00' % ( | 'read packet: $jModulesInfo:[{"file":"%s","triple":"%s"}]]#00' % (module_path, | ||||
lldbutil.append_to_process_working_directory(self, "a.out"), | |||||
seven.unhexlify(info["triple"])), | seven.unhexlify(info["triple"])), | ||||
{"direction": "send", | {"direction": "send", | ||||
"regex": r'^\$\[{(.*)}\]\]#[0-9A-Fa-f]{2}', | "regex": r'^\$\[{(.*)}\]\]#[0-9A-Fa-f]{2}', | ||||
"capture": {1: "spec"}}, | "capture": {1: "spec"}}, | ||||
], True) | ], True) | ||||
context = self.expect_gdbremote_sequence() | context = self.expect_gdbremote_sequence() | ||||
spec = context.get("spec") | spec = context.get("spec") | ||||
Show All 12 Lines |