[lldb/Plugins] Add ScriptedProcess::GetThreadsInfo interface

This patch adds a new method to the Scripted Process interface to
retrive a dictionary of Scripted Threads. It uses the thread ID as a key
and the Scripted Thread instance as the value.

This dictionary will be used to create Scripted Threads in lldb and
perform calls to the python scripted thread object.

rdar://87427126

Differential Revision: https://reviews.llvm.org/D117068

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
This commit is contained in:
Med Ismail Bennani committed 2022-01-24 20:25:53 +01:00
1 parent c27f8fb968
commit 4858fe04a1
4 files changed
+26

No files matched your search

@@ -92,6 +92,17 @@ ScriptedProcessPythonInterface::GetMemoryRegionContainingAddress(
return mem_region;
}
StructuredData::DictionarySP ScriptedProcessPythonInterface::GetThreadsInfo() {
Status error;
StructuredData::DictionarySP dict =
Dispatch<StructuredData::DictionarySP>("get_threads_info", error);
if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, dict, error))
return {};
return dict;
}
StructuredData::DictionarySP
ScriptedProcessPythonInterface::GetThreadWithID(lldb::tid_t tid) {
Status error;