[Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (#113470)
[llvm-project.git] / lldb / test / API / functionalities / gdb_remote_client / operating_system.py
blob3681c17a86860705f90860e3841fa2c0e89394bd
1 import lldb
4 class OperatingSystemPlugIn(object):
5 """Class that provides data for an instance of a LLDB 'OperatingSystemPython' plug-in class"""
7 def __init__(self, process):
8 """Initialization needs a valid.SBProcess object.
10 This plug-in will get created after a live process is valid and has stopped for the first time.
11 """
12 self.process = None
13 self.registers = None
14 self.threads = None
15 if isinstance(process, lldb.SBProcess) and process.IsValid():
16 self.process = process
17 self.threads = None # Will be an dictionary containing info for each thread
19 def get_target(self):
20 return self.process.target
22 def get_thread_info(self):
23 if not self.threads:
24 self.threads = [
26 "tid": 0x1,
27 "name": "one",
28 "queue": "queue1",
29 "state": "stopped",
30 "stop_reason": "none",
33 "tid": 0x2,
34 "name": "two",
35 "queue": "queue2",
36 "state": "stopped",
37 "stop_reason": "none",
40 "tid": 0x3,
41 "name": "three",
42 "queue": "queue3",
43 "state": "stopped",
44 "stop_reason": "sigstop",
45 "core": 0,
48 return self.threads