LLDB
mainline
llvm-project
lldb
source
Plugins
InstrumentationRuntime
BoundsSafety
InstrumentationRuntimeBoundsSafety.h
Go to the documentation of this file.
1
//===----------------------------------------------------------------------===//
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_BOUNDS_SAFETY_SOFT_TRAP_H
10
#define LLDB_SOURCE_PLUGINS_INSTRUMENTATIONRUNTIME_BOUNDS_SAFETY_SOFT_TRAP_H
11
12
#include "
lldb/Target/ABI.h
"
13
#include "
lldb/Target/InstrumentationRuntime.h
"
14
#include "
lldb/Utility/StructuredData.h
"
15
#include "
lldb/lldb-private.h
"
16
17
namespace
lldb_private
{
18
19
class
InstrumentationRuntimeBoundsSafety
20
:
public
lldb_private::InstrumentationRuntime
{
21
public
:
22
~InstrumentationRuntimeBoundsSafety
()
override
;
23
24
static
lldb::InstrumentationRuntimeSP
25
CreateInstance
(
const
lldb::ProcessSP
&process_sp);
26
27
static
void
Initialize
();
28
29
static
void
Terminate
();
30
31
static
llvm::StringRef
GetPluginNameStatic
() {
return
"BoundsSafety"
; }
32
33
static
lldb::InstrumentationRuntimeType
GetTypeStatic
();
34
35
llvm::StringRef
GetPluginName
()
override
{
return
GetPluginNameStatic
(); }
36
37
virtual
lldb::InstrumentationRuntimeType
GetType
() {
return
GetTypeStatic
(); }
38
39
private
:
40
InstrumentationRuntimeBoundsSafety
(
const
lldb::ProcessSP
&process_sp)
41
:
lldb_private
::
InstrumentationRuntime
(process_sp) {}
42
43
const
RegularExpression
&
GetPatternForRuntimeLibrary
()
override
;
44
45
bool
CheckIfRuntimeIsValid
(
const
lldb::ModuleSP
module_sp)
override
;
46
47
void
Activate
()
override
;
48
49
void
Deactivate
();
50
51
static
bool
NotifyBreakpointHit
(
void
*baton,
52
StoppointCallbackContext
*context,
53
lldb::user_id_t
break_id,
54
lldb::user_id_t
break_loc_id);
55
56
bool
MatchAllModules
()
override
{
return
true
; }
57
};
58
59
}
// namespace lldb_private
60
61
#endif
ABI.h
InstrumentationRuntime.h
StructuredData.h
lldb_private::InstrumentationRuntimeBoundsSafety::~InstrumentationRuntimeBoundsSafety
~InstrumentationRuntimeBoundsSafety() override
Definition
InstrumentationRuntimeBoundsSafety.cpp:333
lldb_private::InstrumentationRuntimeBoundsSafety::CreateInstance
static lldb::InstrumentationRuntimeSP CreateInstance(const lldb::ProcessSP &process_sp)
Definition
InstrumentationRuntimeBoundsSafety.cpp:338
lldb_private::InstrumentationRuntimeBoundsSafety::GetType
virtual lldb::InstrumentationRuntimeType GetType()
Definition
InstrumentationRuntimeBoundsSafety.h:37
lldb_private::InstrumentationRuntimeBoundsSafety::NotifyBreakpointHit
static bool NotifyBreakpointHit(void *baton, StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id)
Definition
InstrumentationRuntimeBoundsSafety.cpp:385
lldb_private::InstrumentationRuntimeBoundsSafety::GetTypeStatic
static lldb::InstrumentationRuntimeType GetTypeStatic()
Definition
InstrumentationRuntimeBoundsSafety.cpp:355
lldb_private::InstrumentationRuntimeBoundsSafety::GetPluginNameStatic
static llvm::StringRef GetPluginNameStatic()
Definition
InstrumentationRuntimeBoundsSafety.h:31
lldb_private::InstrumentationRuntimeBoundsSafety::MatchAllModules
bool MatchAllModules() override
Definition
InstrumentationRuntimeBoundsSafety.h:56
lldb_private::InstrumentationRuntimeBoundsSafety::InstrumentationRuntimeBoundsSafety
InstrumentationRuntimeBoundsSafety(const lldb::ProcessSP &process_sp)
Definition
InstrumentationRuntimeBoundsSafety.h:40
lldb_private::InstrumentationRuntimeBoundsSafety::Deactivate
void Deactivate()
Definition
InstrumentationRuntimeBoundsSafety.cpp:467
lldb_private::InstrumentationRuntimeBoundsSafety::GetPluginName
llvm::StringRef GetPluginName() override
Definition
InstrumentationRuntimeBoundsSafety.h:35
lldb_private::InstrumentationRuntimeBoundsSafety::CheckIfRuntimeIsValid
bool CheckIfRuntimeIsValid(const lldb::ModuleSP module_sp) override
Check whether module_sp corresponds to a valid runtime library.
Definition
InstrumentationRuntimeBoundsSafety.cpp:365
lldb_private::InstrumentationRuntimeBoundsSafety::GetPatternForRuntimeLibrary
const RegularExpression & GetPatternForRuntimeLibrary() override
Return a regular expression which can be used to identify a valid version of the runtime library.
Definition
InstrumentationRuntimeBoundsSafety.cpp:360
lldb_private::InstrumentationRuntimeBoundsSafety::Activate
void Activate() override
Register a breakpoint in the runtime library and perform any other necessary initialization.
Definition
InstrumentationRuntimeBoundsSafety.cpp:421
lldb_private::InstrumentationRuntimeBoundsSafety::Initialize
static void Initialize()
Definition
InstrumentationRuntimeBoundsSafety.cpp:344
lldb_private::InstrumentationRuntimeBoundsSafety::Terminate
static void Terminate()
Definition
InstrumentationRuntimeBoundsSafety.cpp:350
lldb_private::InstrumentationRuntime
Definition
InstrumentationRuntime.h:29
lldb_private::InstrumentationRuntime::InstrumentationRuntime
InstrumentationRuntime(const lldb::ProcessSP &process_sp)
Definition
InstrumentationRuntime.h:44
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.h
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:396
lldb::InstrumentationRuntimeType
InstrumentationRuntimeType
Definition
lldb-enumerations.h:538
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:367
lldb::ModuleSP
std::shared_ptr< lldb_private::Module > ModuleSP
Definition
lldb-forward.h:380
Generated on
for LLDB by
1.14.0