2020-07-26 15:36:28 -04:00
|
|
|
//===-- NativeWatchpointList.cpp ------------------------------------------===//
|
2015-02-08 20:44:09 -05:00
|
|
|
//
|
2019-08-20 16:51:52 -04:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2015-02-08 20:44:09 -05:00
|
|
|
//
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
|
|
#include "lldb/Host/common/NativeWatchpointList.h"
|
|
|
|
|
|
2017-04-16 12:04:10 -04:00
|
|
|
#include "lldb/Utility/Log.h"
|
2015-02-08 20:44:09 -05:00
|
|
|
|
|
|
|
|
using namespace lldb;
|
|
|
|
|
using namespace lldb_private;
|
|
|
|
|
|
2017-05-16 15:47:58 -04:00
|
|
|
Status NativeWatchpointList::Add(addr_t addr, size_t size, uint32_t watch_flags,
|
|
|
|
|
bool hardware) {
|
2017-01-02 14:26:05 -05:00
|
|
|
m_watchpoints[addr] = {addr, size, watch_flags, hardware};
|
2017-05-16 15:47:58 -04:00
|
|
|
return Status();
|
2015-02-08 20:44:09 -05:00
|
|
|
}
|
|
|
|
|
|
2017-05-16 15:47:58 -04:00
|
|
|
Status NativeWatchpointList::Remove(addr_t addr) {
|
2017-01-02 14:26:05 -05:00
|
|
|
m_watchpoints.erase(addr);
|
2017-05-16 15:47:58 -04:00
|
|
|
return Status();
|
2015-02-08 20:44:09 -05:00
|
|
|
}
|
|
|
|
|
|
2017-01-02 14:26:05 -05:00
|
|
|
const NativeWatchpointList::WatchpointMap &
|
|
|
|
|
NativeWatchpointList::GetWatchpointMap() const {
|
|
|
|
|
return m_watchpoints;
|
2015-02-08 20:44:09 -05:00
|
|
|
}
|