NativeWatchpointList.h revision 314564
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/Core/Error.h" 14#include "lldb/lldb-private-forward.h" 15 16#include <map> 17 18namespace lldb_private { 19struct NativeWatchpoint { 20 lldb::addr_t m_addr; 21 size_t m_size; 22 uint32_t m_watch_flags; 23 bool m_hardware; 24}; 25 26class NativeWatchpointList { 27public: 28 Error Add(lldb::addr_t addr, size_t size, uint32_t watch_flags, 29 bool hardware); 30 31 Error Remove(lldb::addr_t addr); 32 33 using WatchpointMap = std::map<lldb::addr_t, NativeWatchpoint>; 34 35 const WatchpointMap &GetWatchpointMap() const; 36 37private: 38 WatchpointMap m_watchpoints; 39}; 40} 41 42#endif // ifndef liblldb_NativeWatchpointList_h_ 43