36 "AddressSanitizer instrumentation runtime plugin for Libsanitizers.",
57 llvm::StringRef(
"libsystem_sanitizers\\.dylib"));
63 const Symbol *symbol = module_sp->FindFirstSymbolWithNameAndType(
66 return symbol !=
nullptr;
72 assert(baton &&
"null baton");
96 module_sp, process_sp,
ConstString(
"sanitizers_address_on_report"));
100 module_sp, process_sp,
101 ConstString(
"_Z22raise_sanitizers_error23sanitizer_error_context"));
107 const bool sync =
false;
#define LLDB_PLUGIN_DEFINE(PluginName)
static lldb::InstrumentationRuntimeType GetTypeStatic()
~InstrumentationRuntimeASanLibsanitizers() override
static llvm::StringRef GetPluginNameStatic()
static lldb::InstrumentationRuntimeSP CreateInstance(const lldb::ProcessSP &process_sp)
bool CheckIfRuntimeIsValid(const lldb::ModuleSP module_sp) override
Check whether module_sp corresponds to a valid runtime library.
const lldb_private::RegularExpression & GetPatternForRuntimeLibrary() override
Return a regular expression which can be used to identify a valid version of the runtime library.
void Activate() override
Register a breakpoint in the runtime library and perform any other necessary initialization.
static bool NotifyBreakpointHit(void *baton, lldb_private::StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id)
General Outline: A breakpoint has four main parts, a filter, a resolver, the list of breakpoint locat...
void SetBreakpointKind(const char *kind)
Set the "kind" description for a breakpoint.
void SetCallback(BreakpointHitCallback callback, void *baton, bool is_synchronous=false)
Set the callback action invoked when the breakpoint is hit.
A uniqued constant string class.
void SetBreakpointID(lldb::user_id_t ID)
void SetActive(bool IsActive)
lldb::user_id_t GetBreakpointID() const
lldb::ModuleSP GetRuntimeModuleSP()
lldb::ProcessSP GetProcessSP()
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static bool UnregisterPlugin(ABICreateInstance create_callback)
static bool NotifyBreakpointHit(lldb::ProcessSP process_sp, StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id)
static Breakpoint * SetupBreakpoint(lldb::ModuleSP, lldb::ProcessSP, ConstString)
General Outline: When we hit a breakpoint we need to package up whatever information is needed to eva...
lldb::break_id_t GetID() const
#define LLDB_INVALID_BREAK_ID
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::Process > ProcessSP
InstrumentationRuntimeType
@ eInstrumentationRuntimeTypeLibsanitizersAsan
std::shared_ptr< lldb_private::InstrumentationRuntime > InstrumentationRuntimeSP
std::shared_ptr< lldb_private::Module > ModuleSP