blob: 35e5979bd9e7e73336ea3f53ae6735150d231b2a [file] [log] [blame]
Chris Lattner30fdc8d2010-06-08 16:52:24 +00001//===-- 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
17using namespace lldb;
18using namespace lldb_private;
19
20//----------------------------------------------------------------------
21// StoppointLocation constructor
22//----------------------------------------------------------------------
Jim Ingham1b54c882010-06-16 02:00:15 +000023StoppointLocation::StoppointLocation (break_id_t bid, addr_t addr, bool hardware) :
Chris Lattner30fdc8d2010-06-08 16:52:24 +000024 m_loc_id(bid),
Chris Lattner30fdc8d2010-06-08 16:52:24 +000025 m_addr(addr),
Greg Claytoneb023e72013-10-11 19:48:25 +000026 m_hardware(hardware),
27 m_hardware_index(LLDB_INVALID_INDEX32),
Greg Claytonc982c762010-07-09 20:39:50 +000028 m_byte_size(0),
29 m_hit_count(0)
Chris Lattner30fdc8d2010-06-08 16:52:24 +000030{
31}
32
Greg Claytonc91d8042011-12-03 00:46:21 +000033StoppointLocation::StoppointLocation (break_id_t bid, addr_t addr, uint32_t byte_size, bool hardware) :
Chris Lattner30fdc8d2010-06-08 16:52:24 +000034 m_loc_id(bid),
Chris Lattner30fdc8d2010-06-08 16:52:24 +000035 m_addr(addr),
Greg Claytoneb023e72013-10-11 19:48:25 +000036 m_hardware(hardware),
37 m_hardware_index(LLDB_INVALID_INDEX32),
Greg Claytonc91d8042011-12-03 00:46:21 +000038 m_byte_size(byte_size),
Greg Claytonc982c762010-07-09 20:39:50 +000039 m_hit_count(0)
Chris Lattner30fdc8d2010-06-08 16:52:24 +000040{
41}
42
43//----------------------------------------------------------------------
44// Destructor
45//----------------------------------------------------------------------
46StoppointLocation::~StoppointLocation()
47{
48}
Jim Inghamd762df82015-01-15 01:41:04 +000049
50void
51StoppointLocation::DecrementHitCount ()
52{
53 assert (m_hit_count > 0);
54 --m_hit_count;
55}