LLDB  mainline
UBSanRuntime.h
Go to the documentation of this file.
1 //===-- UndefinedBehaviorSanitizerRuntime.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 liblldb_UndefinedBehaviorSanitizerRuntime_h_
10 #define liblldb_UndefinedBehaviorSanitizerRuntime_h_
11 
12 #include "lldb/Target/ABI.h"
15 #include "lldb/lldb-private.h"
16 
17 namespace lldb_private {
18 
21 public:
23 
24  static lldb::InstrumentationRuntimeSP
25  CreateInstance(const lldb::ProcessSP &process_sp);
26 
27  static void Initialize();
28 
29  static void Terminate();
30 
32 
34 
36  return GetPluginNameStatic();
37  }
38 
40 
41  uint32_t GetPluginVersion() override { return 1; }
42 
43  lldb::ThreadCollectionSP
45 
46 private:
47  UndefinedBehaviorSanitizerRuntime(const lldb::ProcessSP &process_sp)
49 
50  const RegularExpression &GetPatternForRuntimeLibrary() override;
51 
52  bool CheckIfRuntimeIsValid(const lldb::ModuleSP module_sp) override;
53 
54  void Activate() override;
55 
56  void Deactivate();
57 
58  static bool NotifyBreakpointHit(void *baton,
59  StoppointCallbackContext *context,
60  lldb::user_id_t break_id,
61  lldb::user_id_t break_loc_id);
62 
63  StructuredData::ObjectSP RetrieveReportData(ExecutionContextRef exe_ctx_ref);
64 };
65 
66 } // namespace lldb_private
67 
68 #endif // liblldb_UndefinedBehaviorSanitizerRuntime_h_
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
static lldb::InstrumentationRuntimeType GetTypeStatic()
"lldb/Utility/RegularExpression.h" A C++ wrapper class for regex.
static lldb::InstrumentationRuntimeSP CreateInstance(const lldb::ProcessSP &process_sp)
uint64_t user_id_t
Definition: lldb-types.h:84
InstrumentationRuntimeType
Execution context objects refer to objects in the execution of the program that is being debugged...
virtual lldb::InstrumentationRuntimeType GetType()
Definition: UBSanRuntime.h:39
lldb_private::ConstString GetPluginName() override
Definition: UBSanRuntime.h:35
static lldb_private::ConstString GetPluginNameStatic()
A uniqued constant string class.
Definition: ConstString.h:38
std::shared_ptr< Object > ObjectSP
lldb::ThreadCollectionSP GetBacktracesFromExtendedStopInfo(StructuredData::ObjectSP info) override
General Outline: When we hit a breakpoint we need to package up whatever information is needed to eva...