xref: /NextBSD/contrib/llvm/tools/lldb/source/Host/common/NativeWatchpointList.cpp (revision 84d351007654069f9643c8e4b4802a7f5f08ee42)
1 //===-- NativeWatchpointList.cpp --------------------------------*- 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 #include "lldb/Host/common/NativeWatchpointList.h"
11 
12 #include "lldb/Core/Log.h"
13 
14 using namespace lldb;
15 using namespace lldb_private;
16 
17 Error
Add(addr_t addr,size_t size,uint32_t watch_flags,bool hardware)18 NativeWatchpointList::Add (addr_t addr, size_t size, uint32_t watch_flags, bool hardware)
19 {
20     m_watchpoints[addr] = {addr, size, watch_flags, hardware};
21     return Error ();
22 }
23 
24 Error
Remove(addr_t addr)25 NativeWatchpointList::Remove (addr_t addr)
26 {
27     m_watchpoints.erase(addr);
28     return Error ();
29 }
30 
31 const NativeWatchpointList::WatchpointMap&
GetWatchpointMap() const32 NativeWatchpointList::GetWatchpointMap () const
33 {
34     return m_watchpoints;
35 }
36