LLDB
mainline
llvm-project
lldb
include
lldb
API
SBSection.h
Go to the documentation of this file.
1
//===-- SBSection.h ---------------------------------------------*- 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
#ifndef LLDB_API_SBSECTION_H
10
#define LLDB_API_SBSECTION_H
11
12
#include "
lldb/API/SBData.h
"
13
#include "
lldb/API/SBDefines.h
"
14
15
namespace
lldb
{
16
17
class
LLDB_API
SBSection
{
18
public
:
19
SBSection
();
20
21
SBSection
(
const
lldb::SBSection
&rhs);
22
23
~SBSection
();
24
25
const
lldb::SBSection
&operator=(
const
lldb::SBSection
&rhs);
26
27
explicit
operator
bool()
const
;
28
29
bool
IsValid()
const
;
30
31
const
char
*
GetName
();
32
33
lldb::SBSection
GetParent();
34
35
lldb::SBSection
FindSubSection(
const
char
*sect_name);
36
37
size_t
GetNumSubSections();
38
39
lldb::SBSection
GetSubSectionAtIndex(
size_t
idx);
40
41
lldb::addr_t
GetFileAddress();
42
43
lldb::addr_t
GetLoadAddress(
lldb::SBTarget
&target);
44
45
lldb::addr_t
GetByteSize();
46
47
uint64_t GetFileOffset();
48
49
uint64_t GetFileByteSize();
50
51
lldb::SBData
GetSectionData();
52
53
lldb::SBData
GetSectionData(uint64_t offset, uint64_t size);
54
55
SectionType
GetSectionType
();
56
57
/// Gets the permissions (RWX) of the section of the object file
58
///
59
/// Returns a mask of bits of enum lldb::Permissions for this section.
60
/// Sections for which permissions are not defined, 0 is returned for
61
/// them. The binary representation of this value corresponds to [XRW]
62
/// i.e. for a section having read and execute permissions, the value
63
/// returned is 6
64
///
65
/// \return
66
/// Returns an unsigned value for Permissions for the section.
67
uint32_t
68
GetPermissions
()
const
;
69
70
/// Return the size of a target's byte represented by this section
71
/// in numbers of host bytes. Note that certain architectures have
72
/// varying minimum addressable unit (i.e. byte) size for their
73
/// CODE or DATA buses.
74
///
75
/// \return
76
/// The number of host (8-bit) bytes needed to hold a target byte
77
uint32_t
GetTargetByteSize
();
78
79
/// Return the alignment of the section in bytes
80
///
81
/// \return
82
/// The alignment of the section in bytes
83
uint32_t GetAlignment();
84
85
bool
operator==
(
const
lldb::SBSection
&rhs);
86
87
bool
operator!=(
const
lldb::SBSection
&rhs);
88
89
bool
GetDescription(
lldb::SBStream
&description);
90
91
private
:
92
friend
class
SBAddress
;
93
friend
class
SBModule
;
94
friend
class
SBTarget
;
95
96
SBSection
(
const
lldb::SectionSP
§ion_sp);
97
98
lldb::SectionSP
GetSP()
const
;
99
100
void
SetSP(
const
lldb::SectionSP
§ion_sp);
101
102
lldb::SectionWP
m_opaque_wp
;
103
};
104
105
}
// namespace lldb
106
107
#endif
// LLDB_API_SBSECTION_H
GetName
static const char * GetName(DWARFDeclContext::Entry entry)
Returns the name of entry if it has one, or the appropriate "anonymous {namespace,...
Definition:
DWARFDeclContext.cpp:17
GetTargetByteSize
static uint32_t GetTargetByteSize(SectionType Type, const ArchSpec &arch)
Definition:
ObjectFileELF.cpp:1715
GetPermissions
static Permissions GetPermissions(const ELFSectionHeader &H)
Definition:
ObjectFileELF.cpp:1727
GetSectionType
static lldb::SectionType GetSectionType(uint32_t flags, ConstString section_name)
Definition:
ObjectFileMachO.cpp:1430
SBData.h
SBDefines.h
LLDB_API
#define LLDB_API
Definition:
SBDefines.h:28
lldb::SBAddress
Definition:
SBAddress.h:17
lldb::SBData
Definition:
SBData.h:20
lldb::SBModule
Definition:
SBModule.h:20
lldb::SBSection
Definition:
SBSection.h:17
lldb::SBSection::~SBSection
~SBSection()
lldb::SBSection::m_opaque_wp
lldb::SectionWP m_opaque_wp
Definition:
SBSection.h:102
lldb::SBStream
Definition:
SBStream.h:18
lldb::SBTarget
Definition:
SBTarget.h:37
lldb
Definition:
SBAddress.h:15
lldb::SectionSP
std::shared_ptr< lldb_private::Section > SectionSP
Definition:
lldb-forward.h:406
lldb::addr_t
uint64_t addr_t
Definition:
lldb-types.h:79
lldb::operator==
bool LLDB_API operator==(const SBAddress &lhs, const SBAddress &rhs)
Definition:
SBAddress.cpp:60
lldb::SectionType
SectionType
Definition:
lldb-enumerations.h:698
lldb::SectionWP
std::weak_ptr< lldb_private::Section > SectionWP
Definition:
lldb-forward.h:408
Generated on Tue Apr 23 2024 17:51:46 for LLDB by
1.9.6