Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / functionalities / scripted_platform / my_scripted_platform.py
bloba0e286fbdc467b5200bfed2f3c01238b1dfb765b
1 import os
3 import lldb
4 from lldb.plugins.scripted_platform import ScriptedPlatform
7 class MyScriptedPlatform(ScriptedPlatform):
8 def __init__(self, exe_ctx, args):
9 self.processes = {}
11 proc = {}
12 proc["name"] = "a.out"
13 proc["arch"] = "arm64-apple-macosx"
14 proc["pid"] = 420
15 proc["parent"] = 42
16 proc["uid"] = 501
17 proc["gid"] = 20
18 self.processes[420] = proc
20 def list_processes(self):
21 return self.processes
23 def get_process_info(self, pid):
24 return self.processes[pid]
26 def launch_process(self, launch_info):
27 return lldb.SBError()
29 def kill_process(self, pid):
30 return lldb.SBError()
33 def __lldb_init_module(debugger, dict):
34 if not "SKIP_SCRIPTED_PLATFORM_SELECT" in os.environ:
35 debugger.HandleCommand(
36 "platform select scripted-platform -C %s.%s"
37 % (__name__, MyScriptedPlatform.__name__)
39 else:
40 print(
41 "Name of the class that will manage the scripted platform: '%s.%s'"
42 % (__name__, MyScriptedPlatform.__name__)