32llvm::Expected<StructuredData::GenericSP>
36 scripted_metadata,
nullptr, break_sp, scripted_metadata.
GetArgsSP());
41 TargetSP target_sp = target.shared_from_this();
45 LLVM_PRETTY_FUNCTION);
49 return obj->GetBooleanValue();
64 return obj->GetBooleanValue();
73 uint64_t value = obj->GetUnsignedIntegerValue();
87 return obj->GetStringValue().str();
92 llvm::Expected<lldb::BreakpointLocationSP> loc_or_err =
96 "Error calling was_hit method: {0}");
103std::optional<std::string>
108 LLVM_PRETTY_FUNCTION);
112 return obj->GetStringValue().str();
116 const std::vector<llvm::StringRef> ci_usages = {
117 "breakpoint set -P classname [-k key -v value ...]"};
118 const std::vector<llvm::StringRef> api_usages = {
119 "SBTarget.BreakpointCreateFromScript"};
122 llvm::StringRef(
"Create a breakpoint that chooses locations based on "
123 "user-created callbacks"),
#define LLDB_LOG_ERROR(log, error,...)
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static bool UnregisterPlugin(ABICreateInstance create_callback)
llvm::Expected< StructuredData::GenericSP > CreatePluginObject(const ScriptedMetadata &scripted_metadata, lldb::BreakpointSP break_sp) override
bool OverridesResolver(Target &target, StructuredDataImpl &resolver_data) override
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
static llvm::StringRef GetPluginNameStatic()
virtual std::optional< std::string > GetLocationDescription(lldb::BreakpointLocationSP bp_loc_sp, lldb::DescriptionLevel level) override
void SetBreakpoint(lldb::BreakpointSP break_sp) override
static bool CreateInstance(lldb::ScriptLanguage language, ScriptedInterfaceUsages usages)
static T LogAndDefault(llvm::Expected< T > value_or_err, llvm::StringRef caller)
Log the failure in value_or_err and fall back to a default-constructed T.
ScriptedPythonInterface(ScriptInterpreterPythonImpl &interpreter)
llvm::Expected< T > Dispatch(llvm::StringRef method_name, Args &&...args)
Call method_name on the scripted object.
llvm::Expected< StructuredData::GenericSP > CreatePluginObject(const ScriptedMetadata &scripted_metadata, StructuredData::Generic *script_obj, Args... args)
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.
@ eScriptedExtensionScriptedBreakpointResolver
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
std::shared_ptr< lldb_private::Target > TargetSP