StoppointLocation.cpp revision 353358
1//===-- StoppointLocation.cpp -----------------------------------*- C++ -*-===// 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/Breakpoint/StoppointLocation.h" 10 11 12using namespace lldb; 13using namespace lldb_private; 14 15// StoppointLocation constructor 16StoppointLocation::StoppointLocation(break_id_t bid, addr_t addr, bool hardware) 17 : m_loc_id(bid), m_addr(addr), m_hardware(hardware), 18 m_hardware_index(LLDB_INVALID_INDEX32), m_byte_size(0), m_hit_count(0) {} 19 20StoppointLocation::StoppointLocation(break_id_t bid, addr_t addr, 21 uint32_t byte_size, bool hardware) 22 : m_loc_id(bid), m_addr(addr), m_hardware(hardware), 23 m_hardware_index(LLDB_INVALID_INDEX32), m_byte_size(byte_size), 24 m_hit_count(0) {} 25 26// Destructor 27StoppointLocation::~StoppointLocation() {} 28 29void StoppointLocation::DecrementHitCount() { 30 assert(m_hit_count > 0); 31 --m_hit_count; 32} 33