10#include "lldb/Host/Config.h"
29ScriptedThreadPlanPythonInterface::ScriptedThreadPlanPythonInterface(
30 ScriptInterpreterPythonImpl &interpreter)
33llvm::Expected<StructuredData::GenericSP>
34ScriptedThreadPlanPythonInterface::CreatePluginObject(
37 return ScriptedPythonInterface::CreatePluginObject(class_name,
nullptr,
38 thread_plan_sp, args_sp);
42ScriptedThreadPlanPythonInterface::ExplainsStop(
Event *event) {
50 return error.ToError();
53 return obj->GetBooleanValue();
57ScriptedThreadPlanPythonInterface::ShouldStop(
Event *event) {
65 return error.ToError();
68 return obj->GetBooleanValue();
71llvm::Expected<bool> ScriptedThreadPlanPythonInterface::IsStale() {
79 return error.ToError();
82 return obj->GetBooleanValue();
98ScriptedThreadPlanPythonInterface::GetStopDescription(
lldb::StreamSP &stream) {
100 Dispatch(
"stop_description",
error, stream);
103 return error.ToError();
105 return llvm::Error::success();
108void ScriptedThreadPlanPythonInterface::Initialize() {
109 const std::vector<llvm::StringRef> ci_usages = {
110 "thread step-scripted -C <script-name> [-k key -v value ...]"};
111 const std::vector<llvm::StringRef> api_usages = {
112 "SBThread.StepUsingScriptedThreadPlan"};
114 GetPluginNameStatic(),
115 llvm::StringRef(
"Alter thread stepping logic and stop reason"),
119void ScriptedThreadPlanPythonInterface::Terminate() {
static llvm::raw_ostream & error(Stream &strm)
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static bool UnregisterPlugin(ABICreateInstance create_callback)
static bool CheckStructuredDataObject(llvm::StringRef caller, T obj, Status &error)
std::shared_ptr< Object > ObjectSP
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::ThreadPlan > ThreadPlanSP
StateType
Process and Thread States.
@ eStateStepping
Process or thread is in the process of stepping and can not be examined.
std::shared_ptr< lldb_private::Stream > StreamSP