1 //===-- NativeWatchpointList.h ----------------------------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #ifndef liblldb_NativeWatchpointList_h_ 11 #define liblldb_NativeWatchpointList_h_ 12 13 #include "lldb/Utility/Status.h" 14 #include "lldb/lldb-private-forward.h" 15 16 #include <map> 17 18 namespace lldb_private { 19 struct NativeWatchpoint { 20 lldb::addr_t m_addr; 21 size_t m_size; 22 uint32_t m_watch_flags; 23 bool m_hardware; 24 }; 25 26 class NativeWatchpointList { 27 public: 28 Status Add(lldb::addr_t addr, size_t size, uint32_t watch_flags, 29 bool hardware); 30 31 Status Remove(lldb::addr_t addr); 32 33 using WatchpointMap = std::map<lldb::addr_t, NativeWatchpoint>; 34 35 const WatchpointMap &GetWatchpointMap() const; 36 37 private: 38 WatchpointMap m_watchpoints; 39 }; 40 } 41 42 #endif // ifndef liblldb_NativeWatchpointList_h_ 43