Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 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 | // C Includes |
| 13 | // C++ Includes |
| 14 | // Other libraries and framework includes |
| 15 | // Project includes |
| 16 | |
| 17 | using namespace lldb; |
| 18 | using namespace lldb_private; |
| 19 | |
| 20 | //---------------------------------------------------------------------- |
| 21 | // StoppointLocation constructor |
| 22 | //---------------------------------------------------------------------- |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 23 | StoppointLocation::StoppointLocation(break_id_t bid, addr_t addr, bool hardware) |
| 24 | : m_loc_id(bid), m_addr(addr), m_hardware(hardware), |
| 25 | m_hardware_index(LLDB_INVALID_INDEX32), m_byte_size(0), m_hit_count(0) {} |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 26 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 27 | StoppointLocation::StoppointLocation(break_id_t bid, addr_t addr, |
| 28 | uint32_t byte_size, bool hardware) |
| 29 | : m_loc_id(bid), m_addr(addr), m_hardware(hardware), |
| 30 | m_hardware_index(LLDB_INVALID_INDEX32), m_byte_size(byte_size), |
| 31 | m_hit_count(0) {} |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 32 | |
| 33 | //---------------------------------------------------------------------- |
| 34 | // Destructor |
| 35 | //---------------------------------------------------------------------- |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 36 | StoppointLocation::~StoppointLocation() {} |
Jim Ingham | d762df8 | 2015-01-15 01:41:04 +0000 | [diff] [blame] | 37 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 38 | void StoppointLocation::DecrementHitCount() { |
| 39 | assert(m_hit_count > 0); |
| 40 | --m_hit_count; |
Jim Ingham | d762df8 | 2015-01-15 01:41:04 +0000 | [diff] [blame] | 41 | } |