LLDB
mainline
llvm-project
lldb
source
Plugins
InstrumentationRuntime
ASan
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
12
#include "
lldb/Target/InstrumentationRuntime.h
"
13
14
namespace
lldb_private
{
15
16
class
InstrumentationRuntimeASan
:
public
lldb_private::InstrumentationRuntime
{
17
public
:
18
~InstrumentationRuntimeASan
()
override
;
19
20
static
lldb::InstrumentationRuntimeSP
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
29
static
lldb::InstrumentationRuntimeType
GetTypeStatic
();
30
31
llvm::StringRef
GetPluginName
()
override
{
return
GetPluginNameStatic
(); }
32
33
virtual
lldb::InstrumentationRuntimeType
GetType
() {
return
GetTypeStatic
(); }
34
35
private
:
36
InstrumentationRuntimeASan
(
const
lldb::ProcessSP
&process_sp)
37
:
lldb_private
::
InstrumentationRuntime
(process_sp) {}
38
39
const
RegularExpression
&
GetPatternForRuntimeLibrary
()
override
;
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,
48
StoppointCallbackContext
*context,
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
InstrumentationRuntime.h
lldb_private::InstrumentationRuntimeASan
Definition:
InstrumentationRuntimeASan.h:16
lldb_private::InstrumentationRuntimeASan::GetTypeStatic
static lldb::InstrumentationRuntimeType GetTypeStatic()
Definition:
InstrumentationRuntimeASan.cpp:41
lldb_private::InstrumentationRuntimeASan::NotifyBreakpointHit
static bool NotifyBreakpointHit(void *baton, StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id)
Definition:
InstrumentationRuntimeASan.cpp:63
lldb_private::InstrumentationRuntimeASan::~InstrumentationRuntimeASan
~InstrumentationRuntimeASan() override
Definition:
InstrumentationRuntimeASan.cpp:45
lldb_private::InstrumentationRuntimeASan::GetType
virtual lldb::InstrumentationRuntimeType GetType()
Definition:
InstrumentationRuntimeASan.h:33
lldb_private::InstrumentationRuntimeASan::InstrumentationRuntimeASan
InstrumentationRuntimeASan(const lldb::ProcessSP &process_sp)
Definition:
InstrumentationRuntimeASan.h:36
lldb_private::InstrumentationRuntimeASan::Activate
void Activate() override
Register a breakpoint in the runtime library and perform any other necessary initialization.
Definition:
InstrumentationRuntimeASan.cpp:79
lldb_private::InstrumentationRuntimeASan::CreateInstance
static lldb::InstrumentationRuntimeSP CreateInstance(const lldb::ProcessSP &process_sp)
Definition:
InstrumentationRuntimeASan.cpp:27
lldb_private::InstrumentationRuntimeASan::GetPluginName
llvm::StringRef GetPluginName() override
Definition:
InstrumentationRuntimeASan.h:31
lldb_private::InstrumentationRuntimeASan::GetPluginNameStatic
static llvm::StringRef GetPluginNameStatic()
Definition:
InstrumentationRuntimeASan.h:27
lldb_private::InstrumentationRuntimeASan::GetPatternForRuntimeLibrary
const RegularExpression & GetPatternForRuntimeLibrary() override
Return a regular expression which can be used to identify a valid version of the runtime library.
Definition:
InstrumentationRuntimeASan.cpp:48
lldb_private::InstrumentationRuntimeASan::Deactivate
void Deactivate()
Definition:
InstrumentationRuntimeASan.cpp:103
lldb_private::InstrumentationRuntimeASan::CheckIfRuntimeIsValid
bool CheckIfRuntimeIsValid(const lldb::ModuleSP module_sp) override
Check whether module_sp corresponds to a valid runtime library.
Definition:
InstrumentationRuntimeASan.cpp:55
lldb_private::InstrumentationRuntimeASan::Initialize
static void Initialize()
Definition:
InstrumentationRuntimeASan.cpp:31
lldb_private::InstrumentationRuntimeASan::Terminate
static void Terminate()
Definition:
InstrumentationRuntimeASan.cpp:37
lldb_private::InstrumentationRuntime
Definition:
InstrumentationRuntime.h:29
lldb_private::RegularExpression
Definition:
RegularExpression.h:18
lldb_private::StoppointCallbackContext
General Outline: When we hit a breakpoint we need to package up whatever information is needed to eva...
Definition:
StoppointCallbackContext.h:26
lldb_private
A class that represents a running process on the host machine.
Definition:
SBAddressRange.h:14
lldb::ProcessSP
std::shared_ptr< lldb_private::Process > ProcessSP
Definition:
lldb-forward.h:387
lldb::InstrumentationRuntimeType
InstrumentationRuntimeType
Definition:
lldb-enumerations.h:527
lldb::user_id_t
uint64_t user_id_t
Definition:
lldb-types.h:82
lldb::InstrumentationRuntimeSP
std::shared_ptr< lldb_private::InstrumentationRuntime > InstrumentationRuntimeSP
Definition:
lldb-forward.h:358
lldb::ModuleSP
std::shared_ptr< lldb_private::Module > ModuleSP
Definition:
lldb-forward.h:371
Generated on Tue Dec 10 2024 22:32:21 for LLDB by
1.9.6