1 //===-- InstrumentationRuntimeASanLibsanitizers.h ---------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_SOURCE_PLUGINS_INSTRUMENTATIONRUNTIME_ASANLIBSANITIZERS_INSTRUMENTATIONRUNTIMEASANLIBSANITIZERS_H
10 #define LLDB_SOURCE_PLUGINS_INSTRUMENTATIONRUNTIME_ASANLIBSANITIZERS_INSTRUMENTATIONRUNTIMEASANLIBSANITIZERS_H
12 #include "lldb/Target/InstrumentationRuntime.h"
14 class InstrumentationRuntimeASanLibsanitizers
15 : public lldb_private::InstrumentationRuntime
{
17 ~InstrumentationRuntimeASanLibsanitizers() override
;
19 static lldb::InstrumentationRuntimeSP
20 CreateInstance(const lldb::ProcessSP
&process_sp
);
22 static void Initialize();
24 static void Terminate();
26 static llvm::StringRef
GetPluginNameStatic() { return "Libsanitizers-ASan"; }
28 static lldb::InstrumentationRuntimeType
GetTypeStatic();
30 llvm::StringRef
GetPluginName() override
{ return GetPluginNameStatic(); }
32 virtual lldb::InstrumentationRuntimeType
GetType() { return GetTypeStatic(); }
35 InstrumentationRuntimeASanLibsanitizers(const lldb::ProcessSP
&process_sp
)
36 : lldb_private::InstrumentationRuntime(process_sp
) {}
38 const lldb_private::RegularExpression
&GetPatternForRuntimeLibrary() override
;
40 bool CheckIfRuntimeIsValid(const lldb::ModuleSP module_sp
) override
;
42 void Activate() override
;
47 NotifyBreakpointHit(void *baton
,
48 lldb_private::StoppointCallbackContext
*context
,
49 lldb::user_id_t break_id
, lldb::user_id_t break_loc_id
);
52 #endif // LLDB_SOURCE_PLUGINS_INSTRUMENTATIONRUNTIME_ASANLIBSANITIZERS_INSTRUMENTATIONRUNTIMEASANLIBSANITIZERS_H