10#include "lldb/Host/Config.h"
29ScriptedBreakpointPythonInterface::ScriptedBreakpointPythonInterface(
30 ScriptInterpreterPythonImpl &interpreter)
33llvm::Expected<StructuredData::GenericSP>
34ScriptedBreakpointPythonInterface::CreatePluginObject(
37 return ScriptedPythonInterface::CreatePluginObject(class_name,
nullptr,
41bool ScriptedBreakpointPythonInterface::ResolverCallback(
50 LLDB_LOG(log,
"Error calling __callback__ method: {1}",
error);
53 return obj->GetBooleanValue();
64 uint64_t value = obj->GetUnsignedIntegerValue();
72std::optional<std::string> ScriptedBreakpointPythonInterface::GetShortHelp() {
81 return obj->GetAsString()->GetValue().str();
84void ScriptedBreakpointPythonInterface::Initialize() {
85 const std::vector<llvm::StringRef> ci_usages = {
86 "breakpoint set -P classname [-k key -v value ...]"};
87 const std::vector<llvm::StringRef> api_usages = {
88 "SBTarget.BreakpointCreateFromScript"};
90 GetPluginNameStatic(),
91 llvm::StringRef(
"Create a breakpoint that chooses locations based on "
92 "user-created callbacks"),
96void ScriptedBreakpointPythonInterface::Terminate() {
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
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
Defines a symbol context baton that can be handed other debug core functions.
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
std::shared_ptr< lldb_private::Breakpoint > BreakpointSP