1 //===-- MemoryHistoryASan.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_MemoryHistoryASan_h_ 10 #define liblldb_MemoryHistoryASan_h_ 11 12 #include "lldb/Target/ABI.h" 13 #include "lldb/Target/MemoryHistory.h" 14 #include "lldb/Target/Process.h" 15 #include "lldb/lldb-private.h" 16 17 namespace lldb_private { 18 19 class MemoryHistoryASan : public lldb_private::MemoryHistory { 20 public: 21 ~MemoryHistoryASan() override = default; 22 23 static lldb::MemoryHistorySP 24 CreateInstance(const lldb::ProcessSP &process_sp); 25 26 static void Initialize(); 27 28 static void Terminate(); 29 30 static lldb_private::ConstString GetPluginNameStatic(); 31 32 lldb_private::ConstString GetPluginName() override { 33 return GetPluginNameStatic(); 34 } 35 36 uint32_t GetPluginVersion() override { return 1; } 37 38 lldb_private::HistoryThreads GetHistoryThreads(lldb::addr_t address) override; 39 40 private: 41 MemoryHistoryASan(const lldb::ProcessSP &process_sp); 42 43 lldb::ProcessWP m_process_wp; 44 }; 45 46 } // namespace lldb_private 47 48 #endif // liblldb_MemoryHistoryASan_h_ 49