Path: blob/main/contrib/llvm-project/lldb/source/Breakpoint/StopPointSiteList.cpp
39587 views
//===-- StopPointSiteList.cpp ---------------------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#include "lldb/Breakpoint/StopPointSiteList.h"9#include "lldb/Breakpoint/BreakpointSite.h"10#include "lldb/Breakpoint/WatchpointResource.h"1112#include "lldb/Utility/Stream.h"13#include <algorithm>1415using namespace lldb;16using namespace lldb_private;1718// This method is only defined when we're specializing for19// BreakpointSite / BreakpointLocation / Breakpoint.20// Watchpoints don't have a similar structure, they are21// WatchpointResource / Watchpoint2223template <>24bool StopPointSiteList<BreakpointSite>::StopPointSiteContainsBreakpoint(25typename BreakpointSite::SiteID site_id, lldb::break_id_t bp_id) {26std::lock_guard<std::recursive_mutex> guard(m_mutex);27typename collection::const_iterator pos = GetIDConstIterator(site_id);28if (pos != m_site_list.end())29return pos->second->IsBreakpointAtThisSite(bp_id);3031return false;32}3334namespace lldb_private {35template class StopPointSiteList<BreakpointSite>;36} // namespace lldb_private373839