LLDB
mainline
llvm-project
lldb
source
Plugins
InstrumentationRuntime
UBSan
InstrumentationRuntimeUBSan.h
Go to the documentation of this file.
1
//===-- InstrumentationRuntimeUBSan.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_UBSAN_INSTRUMENTATIONRUNTIMEUBSAN_H
10
#define LLDB_SOURCE_PLUGINS_INSTRUMENTATIONRUNTIME_UBSAN_INSTRUMENTATIONRUNTIMEUBSAN_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
InstrumentationRuntimeUBSan
20
:
public
lldb_private::InstrumentationRuntime
{
21
public
:
22
~InstrumentationRuntimeUBSan
()
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
() {
32
return
"UndefinedBehaviorSanitizer"
;
33
}
34
35
static
lldb::InstrumentationRuntimeType
GetTypeStatic
();
36
37
llvm::StringRef
GetPluginName
()
override
{
return
GetPluginNameStatic
(); }
38
39
virtual
lldb::InstrumentationRuntimeType
GetType
() {
return
GetTypeStatic
(); }
40
41
lldb::ThreadCollectionSP
42
GetBacktracesFromExtendedStopInfo
(
StructuredData::ObjectSP
info)
override
;
43
44
private
:
45
InstrumentationRuntimeUBSan
(
const
lldb::ProcessSP
&process_sp)
46
:
lldb_private
::
InstrumentationRuntime
(process_sp) {}
47
48
const
RegularExpression
&
GetPatternForRuntimeLibrary
()
override
;
49
50
bool
CheckIfRuntimeIsValid
(
const
lldb::ModuleSP
module_sp)
override
;
51
52
void
Activate
()
override
;
53
54
void
Deactivate
();
55
56
static
bool
NotifyBreakpointHit
(
void
*baton,
57
StoppointCallbackContext
*context,
58
lldb::user_id_t
break_id,
59
lldb::user_id_t
break_loc_id);
60
61
StructuredData::ObjectSP
RetrieveReportData
(
ExecutionContextRef
exe_ctx_ref);
62
};
63
64
}
// namespace lldb_private
65
66
#endif
// LLDB_SOURCE_PLUGINS_INSTRUMENTATIONRUNTIME_UBSAN_INSTRUMENTATIONRUNTIMEUBSAN_H
ABI.h
InstrumentationRuntime.h
StructuredData.h
lldb_private::ExecutionContextRef
Execution context objects refer to objects in the execution of the program that is being debugged.
Definition:
ExecutionContext.h:72
lldb_private::InstrumentationRuntimeUBSan
Definition:
InstrumentationRuntimeUBSan.h:20
lldb_private::InstrumentationRuntimeUBSan::Deactivate
void Deactivate()
Definition:
InstrumentationRuntimeUBSan.cpp:287
lldb_private::InstrumentationRuntimeUBSan::InstrumentationRuntimeUBSan
InstrumentationRuntimeUBSan(const lldb::ProcessSP &process_sp)
Definition:
InstrumentationRuntimeUBSan.h:45
lldb_private::InstrumentationRuntimeUBSan::Activate
void Activate() override
Register a breakpoint in the runtime library and perform any other necessary initialization.
Definition:
InstrumentationRuntimeUBSan.cpp:247
lldb_private::InstrumentationRuntimeUBSan::GetTypeStatic
static lldb::InstrumentationRuntimeType GetTypeStatic()
Definition:
InstrumentationRuntimeUBSan.cpp:59
lldb_private::InstrumentationRuntimeUBSan::NotifyBreakpointHit
static bool NotifyBreakpointHit(void *baton, StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id)
Definition:
InstrumentationRuntimeUBSan.cpp:200
lldb_private::InstrumentationRuntimeUBSan::CheckIfRuntimeIsValid
bool CheckIfRuntimeIsValid(const lldb::ModuleSP module_sp) override
Check whether module_sp corresponds to a valid runtime library.
Definition:
InstrumentationRuntimeUBSan.cpp:238
lldb_private::InstrumentationRuntimeUBSan::Initialize
static void Initialize()
Definition:
InstrumentationRuntimeUBSan.cpp:48
lldb_private::InstrumentationRuntimeUBSan::RetrieveReportData
StructuredData::ObjectSP RetrieveReportData(ExecutionContextRef exe_ctx_ref)
Definition:
InstrumentationRuntimeUBSan.cpp:104
lldb_private::InstrumentationRuntimeUBSan::GetPluginName
llvm::StringRef GetPluginName() override
Definition:
InstrumentationRuntimeUBSan.h:37
lldb_private::InstrumentationRuntimeUBSan::Terminate
static void Terminate()
Definition:
InstrumentationRuntimeUBSan.cpp:55
lldb_private::InstrumentationRuntimeUBSan::GetBacktracesFromExtendedStopInfo
lldb::ThreadCollectionSP GetBacktracesFromExtendedStopInfo(StructuredData::ObjectSP info) override
Definition:
InstrumentationRuntimeUBSan.cpp:301
lldb_private::InstrumentationRuntimeUBSan::GetPatternForRuntimeLibrary
const RegularExpression & GetPatternForRuntimeLibrary() override
Return a regular expression which can be used to identify a valid version of the runtime library.
Definition:
InstrumentationRuntimeUBSan.cpp:233
lldb_private::InstrumentationRuntimeUBSan::CreateInstance
static lldb::InstrumentationRuntimeSP CreateInstance(const lldb::ProcessSP &process_sp)
Definition:
InstrumentationRuntimeUBSan.cpp:44
lldb_private::InstrumentationRuntimeUBSan::GetType
virtual lldb::InstrumentationRuntimeType GetType()
Definition:
InstrumentationRuntimeUBSan.h:39
lldb_private::InstrumentationRuntimeUBSan::~InstrumentationRuntimeUBSan
~InstrumentationRuntimeUBSan() override
Definition:
InstrumentationRuntimeUBSan.cpp:41
lldb_private::InstrumentationRuntimeUBSan::GetPluginNameStatic
static llvm::StringRef GetPluginNameStatic()
Definition:
InstrumentationRuntimeUBSan.h:31
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::StructuredData::ObjectSP
std::shared_ptr< Object > ObjectSP
Definition:
StructuredData.h:66
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:389
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:360
lldb::ModuleSP
std::shared_ptr< lldb_private::Module > ModuleSP
Definition:
lldb-forward.h:373
lldb::ThreadCollectionSP
std::shared_ptr< lldb_private::ThreadCollection > ThreadCollectionSP
Definition:
lldb-forward.h:452
Generated on Fri Dec 20 2024 17:27:23 for LLDB by
1.9.6