LLDB
mainline
llvm-project
lldb
source
Core
AddressRangeListImpl.cpp
Go to the documentation of this file.
1
//===-- AddressRangeListImpl.cpp ------------------------------------------===//
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/Core/AddressRangeListImpl.h
"
10
11
using namespace
lldb
;
12
using namespace
lldb_private
;
13
14
AddressRangeListImpl::AddressRangeListImpl
() : m_ranges() {}
15
16
size_t
AddressRangeListImpl::GetSize
()
const
{
return
m_ranges
.size(); }
17
18
void
AddressRangeListImpl::Reserve
(
size_t
capacity) {
19
m_ranges
.reserve(capacity);
20
}
21
22
void
AddressRangeListImpl::Append
(
const
AddressRange
&sb_region) {
23
m_ranges
.emplace_back(sb_region);
24
}
25
26
void
AddressRangeListImpl::Append
(
const
AddressRangeListImpl
&list) {
27
Reserve
(
GetSize
() + list.
GetSize
());
28
29
for
(
const
auto
&range : list.
m_ranges
)
30
Append
(range);
31
}
32
33
void
AddressRangeListImpl::Clear
() {
m_ranges
.clear(); }
34
35
lldb_private::AddressRange
36
AddressRangeListImpl::GetAddressRangeAtIndex
(
size_t
index) {
37
if
(index >=
GetSize
())
38
return
AddressRange
();
39
return
m_ranges
[index];
40
}
41
42
AddressRanges
&
AddressRangeListImpl::ref
() {
return
m_ranges
; }
AddressRangeListImpl.h
lldb_private::AddressRangeListImpl
Definition:
AddressRangeListImpl.h:23
lldb_private::AddressRangeListImpl::GetSize
size_t GetSize() const
Definition:
AddressRangeListImpl.cpp:16
lldb_private::AddressRangeListImpl::GetAddressRangeAtIndex
lldb_private::AddressRange GetAddressRangeAtIndex(size_t index)
Definition:
AddressRangeListImpl.cpp:36
lldb_private::AddressRangeListImpl::ref
AddressRanges & ref()
Definition:
AddressRangeListImpl.cpp:42
lldb_private::AddressRangeListImpl::Append
void Append(const AddressRange &sb_region)
Definition:
AddressRangeListImpl.cpp:22
lldb_private::AddressRangeListImpl::Reserve
void Reserve(size_t capacity)
Definition:
AddressRangeListImpl.cpp:18
lldb_private::AddressRangeListImpl::Clear
void Clear()
Definition:
AddressRangeListImpl.cpp:33
lldb_private::AddressRangeListImpl::AddressRangeListImpl
AddressRangeListImpl()
Definition:
AddressRangeListImpl.cpp:14
lldb_private::AddressRangeListImpl::m_ranges
AddressRanges m_ranges
Definition:
AddressRangeListImpl.h:49
lldb_private::AddressRange
A section + offset based address range class.
Definition:
AddressRange.h:25
lldb_private::AddressRanges
Definition:
AddressRange.h:254
lldb_private
A class that represents a running process on the host machine.
Definition:
SBAddressRange.h:14
lldb
Definition:
SBAddress.h:15
Generated on Tue Jan 14 2025 00:24:52 for LLDB by
1.9.6