10#include "lldb/Host/Config.h"
30ScriptedStopHookPythonInterface::ScriptedStopHookPythonInterface(
31 ScriptInterpreterPythonImpl &interpreter)
34llvm::Expected<StructuredData::GenericSP>
35ScriptedStopHookPythonInterface::CreatePluginObject(llvm::StringRef class_name,
38 return ScriptedPythonInterface::CreatePluginObject(class_name,
nullptr,
46 std::make_shared<ExecutionContextRef>(exe_ctx);
54 return error.ToError();
57 return obj->GetBooleanValue();
61void ScriptedStopHookPythonInterface::Initialize() {
62 const std::vector<llvm::StringRef> ci_usages = {
63 "target stop-hook add -P <script-name> [-k key -v value ...]"};
64 const std::vector<llvm::StringRef> api_usages = {};
66 GetPluginNameStatic(),
67 llvm::StringRef(
"Perform actions whenever the process stops, before control is returned to the user."),
71void ScriptedStopHookPythonInterface::Terminate() {
static llvm::raw_ostream & error(Stream &strm)
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
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::Stream > StreamSP
std::shared_ptr< lldb_private::Target > TargetSP
std::shared_ptr< lldb_private::ExecutionContextRef > ExecutionContextRefSP