1*dda28197Spatrick //===-- NativeWatchpointList.cpp ------------------------------------------===//
2061da546Spatrick //
3061da546Spatrick // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4061da546Spatrick // See https://llvm.org/LICENSE.txt for license information.
5061da546Spatrick // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6061da546Spatrick //
7061da546Spatrick //===----------------------------------------------------------------------===//
8061da546Spatrick
9061da546Spatrick #include "lldb/Host/common/NativeWatchpointList.h"
10061da546Spatrick
11061da546Spatrick #include "lldb/Utility/Log.h"
12061da546Spatrick
13061da546Spatrick using namespace lldb;
14061da546Spatrick using namespace lldb_private;
15061da546Spatrick
Add(addr_t addr,size_t size,uint32_t watch_flags,bool hardware)16061da546Spatrick Status NativeWatchpointList::Add(addr_t addr, size_t size, uint32_t watch_flags,
17061da546Spatrick bool hardware) {
18061da546Spatrick m_watchpoints[addr] = {addr, size, watch_flags, hardware};
19061da546Spatrick return Status();
20061da546Spatrick }
21061da546Spatrick
Remove(addr_t addr)22061da546Spatrick Status NativeWatchpointList::Remove(addr_t addr) {
23061da546Spatrick m_watchpoints.erase(addr);
24061da546Spatrick return Status();
25061da546Spatrick }
26061da546Spatrick
27061da546Spatrick const NativeWatchpointList::WatchpointMap &
GetWatchpointMap() const28061da546Spatrick NativeWatchpointList::GetWatchpointMap() const {
29061da546Spatrick return m_watchpoints;
30061da546Spatrick }
31