LLDB mainline
InstrumentationRuntimeASan.h
Go to the documentation of this file.
1//===-- InstrumentationRuntimeASan.h ----------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_SOURCE_PLUGINS_INSTRUMENTATIONRUNTIME_ASAN_INSTRUMENTATIONRUNTIMEASAN_H
10#define LLDB_SOURCE_PLUGINS_INSTRUMENTATIONRUNTIME_ASAN_INSTRUMENTATIONRUNTIMEASAN_H
11
14
15namespace lldb_private {
16
18public:
20
22 CreateInstance(const lldb::ProcessSP &process_sp);
23
24 static void Initialize();
25
26 static void Terminate();
27
28 static llvm::StringRef GetPluginNameStatic() { return "AddressSanitizer"; }
29
31
32 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
33
35
36private:
39
41
42 bool CheckIfRuntimeIsValid(const lldb::ModuleSP module_sp) override;
43
44 void Activate() override;
45
46 void Deactivate();
47
48 static bool NotifyBreakpointHit(void *baton,
50 lldb::user_id_t break_id,
51 lldb::user_id_t break_loc_id);
52
54};
55
56} // namespace lldb_private
57
58#endif // LLDB_SOURCE_PLUGINS_INSTRUMENTATIONRUNTIME_ASAN_INSTRUMENTATIONRUNTIMEASAN_H
static lldb::InstrumentationRuntimeType GetTypeStatic()
static bool NotifyBreakpointHit(void *baton, StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id)
virtual lldb::InstrumentationRuntimeType GetType()
InstrumentationRuntimeASan(const lldb::ProcessSP &process_sp)
void Activate() override
Register a breakpoint in the runtime library and perform any other necessary initialization.
static lldb::InstrumentationRuntimeSP CreateInstance(const lldb::ProcessSP &process_sp)
const RegularExpression & GetPatternForRuntimeLibrary() override
Return a regular expression which can be used to identify a valid version of the runtime library.
bool CheckIfRuntimeIsValid(const lldb::ModuleSP module_sp) override
Check whether module_sp corresponds to a valid runtime library.
InstrumentationRuntime(const lldb::ProcessSP &process_sp)
General Outline: When we hit a breakpoint we need to package up whatever information is needed to eva...
std::shared_ptr< Object > ObjectSP
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::Process > ProcessSP
InstrumentationRuntimeType
uint64_t user_id_t
Definition lldb-types.h:83
std::shared_ptr< lldb_private::InstrumentationRuntime > InstrumentationRuntimeSP
std::shared_ptr< lldb_private::Module > ModuleSP