LLDB mainline
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
lldb::SBSection Class Reference

#include <SBSection.h>

Public Member Functions

 SBSection ()
 
 SBSection (const lldb::SBSection &rhs)
 
 ~SBSection ()
 
const lldb::SBSectionoperator= (const lldb::SBSection &rhs)
 
 operator bool () const
 
bool IsValid () const
 
const char * GetName ()
 
lldb::SBSection GetParent ()
 
lldb::SBSection FindSubSection (const char *sect_name)
 
size_t GetNumSubSections ()
 
lldb::SBSection GetSubSectionAtIndex (size_t idx)
 
lldb::addr_t GetFileAddress ()
 
lldb::addr_t GetLoadAddress (lldb::SBTarget &target)
 
lldb::addr_t GetByteSize ()
 
uint64_t GetFileOffset ()
 
uint64_t GetFileByteSize ()
 
lldb::SBData GetSectionData ()
 
lldb::SBData GetSectionData (uint64_t offset, uint64_t size)
 
SectionType GetSectionType ()
 
uint32_t GetPermissions () const
 Gets the permissions (RWX) of the section of the object file.
 
uint32_t GetTargetByteSize ()
 Return the size of a target's byte represented by this section in numbers of host bytes.
 
uint32_t GetAlignment ()
 Return the alignment of the section in bytes.
 
bool operator== (const lldb::SBSection &rhs)
 
bool operator!= (const lldb::SBSection &rhs)
 
bool GetDescription (lldb::SBStream &description)
 

Private Member Functions

 SBSection (const lldb::SectionSP &section_sp)
 
lldb::SectionSP GetSP () const
 
void SetSP (const lldb::SectionSP &section_sp)
 

Private Attributes

lldb::SectionWP m_opaque_wp
 

Friends

class SBAddress
 
class SBModule
 
class SBTarget
 

Detailed Description

Definition at line 17 of file SBSection.h.

Constructor & Destructor Documentation

◆ SBSection() [1/3]

SBSection::SBSection ( )

Definition at line 23 of file SBSection.cpp.

References LLDB_INSTRUMENT_VA.

◆ SBSection() [2/3]

SBSection::SBSection ( const lldb::SBSection rhs)

Definition at line 25 of file SBSection.cpp.

References LLDB_INSTRUMENT_VA.

◆ ~SBSection()

SBSection::~SBSection ( )
default

References lldb::operator==().

◆ SBSection() [3/3]

SBSection::SBSection ( const lldb::SectionSP section_sp)
private

Definition at line 29 of file SBSection.cpp.

References m_opaque_wp.

Member Function Documentation

◆ FindSubSection()

lldb::SBSection SBSection::FindSubSection ( const char *  sect_name)

Definition at line 78 of file SBSection.cpp.

References GetSP(), LLDB_INSTRUMENT_VA, and SetSP().

◆ GetAlignment()

uint32_t SBSection::GetAlignment ( )

Return the alignment of the section in bytes.

Returns
The alignment of the section in bytes

Definition at line 220 of file SBSection.cpp.

References GetSP(), and LLDB_INSTRUMENT_VA.

◆ GetByteSize()

lldb::addr_t SBSection::GetByteSize ( )

Definition at line 140 of file SBSection.cpp.

References GetSP(), and LLDB_INSTRUMENT_VA.

◆ GetDescription()

bool SBSection::GetDescription ( lldb::SBStream description)

◆ GetFileAddress()

lldb::addr_t SBSection::GetFileAddress ( )

Definition at line 118 of file SBSection.cpp.

References GetSP(), LLDB_INSTRUMENT_VA, and LLDB_INVALID_ADDRESS.

◆ GetFileByteSize()

uint64_t SBSection::GetFileByteSize ( )

Definition at line 164 of file SBSection.cpp.

References GetSP(), and LLDB_INSTRUMENT_VA.

◆ GetFileOffset()

uint64_t SBSection::GetFileOffset ( )

◆ GetLoadAddress()

lldb::addr_t SBSection::GetLoadAddress ( lldb::SBTarget target)

◆ GetName()

const char * SBSection::GetName ( )

Definition at line 56 of file SBSection.cpp.

References GetSP(), and LLDB_INSTRUMENT_VA.

◆ GetNumSubSections()

size_t SBSection::GetNumSubSections ( )

Definition at line 93 of file SBSection.cpp.

References GetSP(), and LLDB_INSTRUMENT_VA.

◆ GetParent()

lldb::SBSection SBSection::GetParent ( )

Definition at line 65 of file SBSection.cpp.

References GetSP(), LLDB_INSTRUMENT_VA, and SetSP().

◆ GetPermissions()

uint32_t SBSection::GetPermissions ( ) const

Gets the permissions (RWX) of the section of the object file.

Returns a mask of bits of enum lldb::Permissions for this section. Sections for which permissions are not defined, 0 is returned for them. The binary representation of this value corresponds to [XRW] i.e. for a section having read and execute permissions, the value returned is 6

Returns
Returns an unsigned value for Permissions for the section.

Definition at line 202 of file SBSection.cpp.

References GetSP(), and LLDB_INSTRUMENT_VA.

◆ GetSectionData() [1/2]

SBData SBSection::GetSectionData ( )

Definition at line 173 of file SBSection.cpp.

References GetSectionData(), LLDB_INSTRUMENT_VA, and UINT64_MAX.

Referenced by GetSectionData().

◆ GetSectionData() [2/2]

SBData SBSection::GetSectionData ( uint64_t  offset,
uint64_t  size 
)

Definition at line 179 of file SBSection.cpp.

References GetSP(), LLDB_INSTRUMENT_VA, and lldb::SBData::SetOpaque().

◆ GetSectionType()

SectionType SBSection::GetSectionType ( )

Definition at line 193 of file SBSection.cpp.

References lldb::eSectionTypeInvalid, GetSP(), and LLDB_INSTRUMENT_VA.

◆ GetSP()

lldb::SectionSP SBSection::GetSP ( ) const
private

◆ GetSubSectionAtIndex()

lldb::SBSection SBSection::GetSubSectionAtIndex ( size_t  idx)

Definition at line 102 of file SBSection.cpp.

References GetSP(), LLDB_INSTRUMENT_VA, and SetSP().

◆ GetTargetByteSize()

uint32_t SBSection::GetTargetByteSize ( )

Return the size of a target's byte represented by this section in numbers of host bytes.

Note that certain architectures have varying minimum addressable unit (i.e. byte) size for their CODE or DATA buses.

Returns
The number of host (8-bit) bytes needed to hold a target byte

Definition at line 211 of file SBSection.cpp.

References GetSP(), and LLDB_INSTRUMENT_VA.

◆ IsValid()

bool SBSection::IsValid ( ) const

◆ operator bool()

SBSection::operator bool ( ) const
explicit

Definition at line 49 of file SBSection.cpp.

References LLDB_INSTRUMENT_VA.

◆ operator!=()

bool SBSection::operator!= ( const lldb::SBSection rhs)

Definition at line 239 of file SBSection.cpp.

References GetSP(), and LLDB_INSTRUMENT_VA.

◆ operator=()

const SBSection & SBSection::operator= ( const lldb::SBSection rhs)

Definition at line 36 of file SBSection.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_wp.

◆ operator==()

bool SBSection::operator== ( const lldb::SBSection rhs)

Definition at line 229 of file SBSection.cpp.

References GetSP(), and LLDB_INSTRUMENT_VA.

◆ SetSP()

void SBSection::SetSP ( const lldb::SectionSP section_sp)
private

Friends And Related Function Documentation

◆ SBAddress

friend class SBAddress
friend

Definition at line 92 of file SBSection.h.

◆ SBModule

friend class SBModule
friend

Definition at line 93 of file SBSection.h.

◆ SBTarget

friend class SBTarget
friend

Definition at line 94 of file SBSection.h.

Member Data Documentation

◆ m_opaque_wp

lldb::SectionWP lldb::SBSection::m_opaque_wp
private

Definition at line 102 of file SBSection.h.

Referenced by GetSP(), operator=(), SBSection(), and SetSP().


The documentation for this class was generated from the following files: