LLDB mainline
InstrumentationRuntimeASanLibsanitizers.h
Go to the documentation of this file.
1//===-- InstrumentationRuntimeASanLibsanitizers.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_ASANLIBSANITIZERS_INSTRUMENTATIONRUNTIMEASANLIBSANITIZERS_H
10#define LLDB_SOURCE_PLUGINS_INSTRUMENTATIONRUNTIME_ASANLIBSANITIZERS_INSTRUMENTATIONRUNTIMEASANLIBSANITIZERS_H
11
13
16public:
18
20 CreateInstance(const lldb::ProcessSP &process_sp);
21
22 static void Initialize();
23
24 static void Terminate();
25
26 static llvm::StringRef GetPluginNameStatic() { return "Libsanitizers-ASan"; }
27
29
30 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
31
33
34private:
36 : lldb_private::InstrumentationRuntime(process_sp) {}
37
39
40 bool CheckIfRuntimeIsValid(const lldb::ModuleSP module_sp) override;
41
42 void Activate() override;
43
44 void Deactivate();
45
46 static bool
47 NotifyBreakpointHit(void *baton,
49 lldb::user_id_t break_id, lldb::user_id_t break_loc_id);
50};
51
52#endif // LLDB_SOURCE_PLUGINS_INSTRUMENTATIONRUNTIME_ASANLIBSANITIZERS_INSTRUMENTATIONRUNTIMEASANLIBSANITIZERS_H
static lldb::InstrumentationRuntimeType GetTypeStatic()
virtual lldb::InstrumentationRuntimeType GetType()
static lldb::InstrumentationRuntimeSP CreateInstance(const lldb::ProcessSP &process_sp)
bool CheckIfRuntimeIsValid(const lldb::ModuleSP module_sp) override
Check whether module_sp corresponds to a valid runtime library.
const lldb_private::RegularExpression & GetPatternForRuntimeLibrary() override
Return a regular expression which can be used to identify a valid version of the runtime library.
void Activate() override
Register a breakpoint in the runtime library and perform any other necessary initialization.
static bool NotifyBreakpointHit(void *baton, lldb_private::StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id)
InstrumentationRuntimeASanLibsanitizers(const lldb::ProcessSP &process_sp)
InstrumentationRuntime(const lldb::ProcessSP &process_sp)
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.
Definition: SBAttachInfo.h:14
std::shared_ptr< lldb_private::Process > ProcessSP
Definition: lldb-forward.h:381
InstrumentationRuntimeType
uint64_t user_id_t
Definition: lldb-types.h:80
std::shared_ptr< lldb_private::InstrumentationRuntime > InstrumentationRuntimeSP
Definition: lldb-forward.h:352
std::shared_ptr< lldb_private::Module > ModuleSP
Definition: lldb-forward.h:365