1//===-- NativeWatchpointList.cpp ------------------------------------------===//
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#include "lldb/Host/common/NativeWatchpointList.h"
10
11#include "lldb/Utility/Log.h"
12
13using namespace lldb;
14using namespace lldb_private;
15
16Status NativeWatchpointList::Add(addr_t addr, size_t size, uint32_t watch_flags,
17 bool hardware) {
18 m_watchpoints[addr] = {.m_addr: addr, .m_size: size, .m_watch_flags: watch_flags, .m_hardware: hardware};
19 return Status();
20}
21
22Status NativeWatchpointList::Remove(addr_t addr) {
23 m_watchpoints.erase(x: addr);
24 return Status();
25}
26
27const NativeWatchpointList::WatchpointMap &
28NativeWatchpointList::GetWatchpointMap() const {
29 return m_watchpoints;
30}
31

source code of lldb/source/Host/common/NativeWatchpointList.cpp