9#include "lldb/Host/Config.h"
17#include "../lldb-python.h"
19#include "../SWIGPythonBridge.h"
20#include "../ScriptInterpreterPythonImpl.h"
26using Locker = ScriptInterpreterPythonImpl::Locker;
28OperatingSystemPythonInterface::OperatingSystemPythonInterface(
29 ScriptInterpreterPythonImpl &interpreter)
32llvm::Expected<StructuredData::GenericSP>
33OperatingSystemPythonInterface::CreatePluginObject(
36 return ScriptedPythonInterface::CreatePluginObject(class_name,
nullptr,
41OperatingSystemPythonInterface::CreateThread(
lldb::tid_t tid,
45 "create_thread",
error, tid, context);
47 if (!ScriptedInterface::CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, dict,
57 Dispatch<StructuredData::ArraySP>(
"get_thread_info",
error);
59 if (!ScriptedInterface::CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, arr,
67 return ScriptedThreadPythonInterface::GetRegisterInfo();
70std::optional<std::string>
71OperatingSystemPythonInterface::GetRegisterContextForTID(
lldb::tid_t tid) {
75 if (!ScriptedInterface::CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj,
79 return obj->GetAsString()->GetValue().str();
static llvm::raw_ostream & error(Stream &strm)
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
const lldb::ProcessSP & GetProcessSP() const
Get accessor to get the process shared pointer.
std::shared_ptr< Dictionary > DictionarySP
std::shared_ptr< Object > ObjectSP
std::shared_ptr< Array > ArraySP
A class that represents a running process on the host machine.