1 //===-- StoppointLocation.cpp -----------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #include "lldb/Breakpoint/StoppointLocation.h"
11 
12 
13 using namespace lldb;
14 using namespace lldb_private;
15 
16 //----------------------------------------------------------------------
17 // StoppointLocation constructor
18 //----------------------------------------------------------------------
StoppointLocation(break_id_t bid,addr_t addr,bool hardware)19 StoppointLocation::StoppointLocation(break_id_t bid, addr_t addr, bool hardware)
20     : m_loc_id(bid), m_addr(addr), m_hardware(hardware),
21       m_hardware_index(LLDB_INVALID_INDEX32), m_byte_size(0), m_hit_count(0) {}
22 
StoppointLocation(break_id_t bid,addr_t addr,uint32_t byte_size,bool hardware)23 StoppointLocation::StoppointLocation(break_id_t bid, addr_t addr,
24                                      uint32_t byte_size, bool hardware)
25     : m_loc_id(bid), m_addr(addr), m_hardware(hardware),
26       m_hardware_index(LLDB_INVALID_INDEX32), m_byte_size(byte_size),
27       m_hit_count(0) {}
28 
29 //----------------------------------------------------------------------
30 // Destructor
31 //----------------------------------------------------------------------
~StoppointLocation()32 StoppointLocation::~StoppointLocation() {}
33 
DecrementHitCount()34 void StoppointLocation::DecrementHitCount() {
35   assert(m_hit_count > 0);
36   --m_hit_count;
37 }
38