30llvm::Expected<StructuredData::GenericSP>
47 LLDB_LOG(log,
"Error calling __callback__ method: {1}",
error);
50 return obj->GetBooleanValue();
61 uint64_t value = obj->GetUnsignedIntegerValue();
78 return obj->GetAsString()->GetValue().str();
85 "was_hit", py_error, frame_sp, bp_loc_sp);
93std::optional<std::string>
98 Dispatch(
"get_location_description",
error, bp_loc_sp, level);
104 return obj->GetAsString()->GetValue().str();
108 const std::vector<llvm::StringRef> ci_usages = {
109 "breakpoint set -P classname [-k key -v value ...]"};
110 const std::vector<llvm::StringRef> api_usages = {
111 "SBTarget.BreakpointCreateFromScript"};
114 llvm::StringRef(
"Create a breakpoint that chooses locations based on "
115 "user-created callbacks"),
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)
std::optional< std::string > GetShortHelp() override
ScriptedBreakpointPythonInterface(ScriptInterpreterPythonImpl &interpreter)
bool ResolverCallback(SymbolContext sym_ctx) override
"ResolverCallback" will get called when a new module is loaded.
lldb::BreakpointLocationSP WasHit(lldb::StackFrameSP frame_sp, lldb::BreakpointLocationSP bp_loc_sp) override
WasHit returns the breakpoint location SP for the location that was "hit".
lldb::SearchDepth GetDepth() override
llvm::Expected< StructuredData::GenericSP > CreatePluginObject(llvm::StringRef class_name, lldb::BreakpointSP break_sp, const StructuredDataImpl &args_sp) override
static llvm::StringRef GetPluginNameStatic()
virtual std::optional< std::string > GetLocationDescription(lldb::BreakpointLocationSP bp_loc_sp, lldb::DescriptionLevel level) override
static bool CheckStructuredDataObject(llvm::StringRef caller, T obj, Status &error)
static bool CreateInstance(lldb::ScriptLanguage language, ScriptedInterfaceUsages usages)
llvm::Expected< StructuredData::GenericSP > CreatePluginObject(llvm::StringRef class_name, StructuredData::Generic *script_obj, Args... args)
ScriptedPythonInterface(ScriptInterpreterPythonImpl &interpreter)
T Dispatch(llvm::StringRef method_name, Status &error, Args &&...args)
bool Fail() const
Test for error condition.
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::StackFrame > StackFrameSP
std::shared_ptr< lldb_private::BreakpointLocation > BreakpointLocationSP
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
std::shared_ptr< lldb_private::Breakpoint > BreakpointSP