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
13
14namespace lldb_private {
15
17public:
19
21 CreateInstance(const lldb::ProcessSP &process_sp);
22
23 static void Initialize();
24
25 static void Terminate();
26
27 static llvm::StringRef GetPluginNameStatic() { return "AddressSanitizer"; }
28
30
31 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
32
34
35private:
37 : lldb_private::InstrumentationRuntime(process_sp) {}
38
40
41 bool CheckIfRuntimeIsValid(const lldb::ModuleSP module_sp) override;
42
43 void Activate() override;
44
45 void Deactivate();
46
47 static bool NotifyBreakpointHit(void *baton,
49 lldb::user_id_t break_id,
50 lldb::user_id_t break_loc_id);
51};
52
53} // namespace lldb_private
54
55#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.
General Outline: When we hit a breakpoint we need to package up whatever information is needed to eva...
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::Process > ProcessSP
Definition: lldb-forward.h:387
InstrumentationRuntimeType
uint64_t user_id_t
Definition: lldb-types.h:82
std::shared_ptr< lldb_private::InstrumentationRuntime > InstrumentationRuntimeSP
Definition: lldb-forward.h:358
std::shared_ptr< lldb_private::Module > ModuleSP
Definition: lldb-forward.h:371