diff options
Diffstat (limited to 'include/lldb/API/SBSection.h')
-rw-r--r-- | include/lldb/API/SBSection.h | 132 |
1 files changed, 60 insertions, 72 deletions
diff --git a/include/lldb/API/SBSection.h b/include/lldb/API/SBSection.h index 0a22413b5b9c..ffd8bf7c979b 100644 --- a/include/lldb/API/SBSection.h +++ b/include/lldb/API/SBSection.h @@ -10,106 +10,94 @@ #ifndef LLDB_SBSection_h_ #define LLDB_SBSection_h_ -#include "lldb/API/SBDefines.h" #include "lldb/API/SBData.h" +#include "lldb/API/SBDefines.h" namespace lldb { -class LLDB_API SBSection -{ +class LLDB_API SBSection { public: + SBSection(); + + SBSection(const lldb::SBSection &rhs); + + ~SBSection(); + + const lldb::SBSection &operator=(const lldb::SBSection &rhs); - SBSection (); + bool IsValid() const; - SBSection (const lldb::SBSection &rhs); + const char *GetName(); - ~SBSection (); + lldb::SBSection GetParent(); - const lldb::SBSection & - operator = (const lldb::SBSection &rhs); + lldb::SBSection FindSubSection(const char *sect_name); - bool - IsValid () const; + size_t GetNumSubSections(); - const char * - GetName (); + lldb::SBSection GetSubSectionAtIndex(size_t idx); - lldb::SBSection - GetParent(); + lldb::addr_t GetFileAddress(); - lldb::SBSection - FindSubSection (const char *sect_name); + lldb::addr_t GetLoadAddress(lldb::SBTarget &target); - size_t - GetNumSubSections (); + lldb::addr_t GetByteSize(); - lldb::SBSection - GetSubSectionAtIndex (size_t idx); + uint64_t GetFileOffset(); - lldb::addr_t - GetFileAddress (); + uint64_t GetFileByteSize(); - lldb::addr_t - GetLoadAddress (lldb::SBTarget &target); - - lldb::addr_t - GetByteSize (); + lldb::SBData GetSectionData(); - uint64_t - GetFileOffset (); + lldb::SBData GetSectionData(uint64_t offset, uint64_t size); - uint64_t - GetFileByteSize (); - - lldb::SBData - GetSectionData (); + SectionType GetSectionType(); - lldb::SBData - GetSectionData (uint64_t offset, - uint64_t size); - - SectionType - GetSectionType (); + //------------------------------------------------------------------ + /// 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 + /// + /// @return + /// Returns an unsigned value for Permissions for the section. + //------------------------------------------------------------------ + uint32_t + GetPermissions() const; - //------------------------------------------------------------------ - /// 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. - /// - /// @return - /// The number of host (8-bit) bytes needed to hold a target byte - //------------------------------------------------------------------ - uint32_t - 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. + /// + /// @return + /// The number of host (8-bit) bytes needed to hold a target byte + //------------------------------------------------------------------ + uint32_t GetTargetByteSize(); - bool - operator == (const lldb::SBSection &rhs); + bool operator==(const lldb::SBSection &rhs); - bool - operator != (const lldb::SBSection &rhs); + bool operator!=(const lldb::SBSection &rhs); - bool - GetDescription (lldb::SBStream &description); - + bool GetDescription(lldb::SBStream &description); private: + friend class SBAddress; + friend class SBModule; + friend class SBTarget; - friend class SBAddress; - friend class SBModule; - friend class SBTarget; - - SBSection (const lldb::SectionSP §ion_sp); - - lldb::SectionSP - GetSP() const; - - void - SetSP(const lldb::SectionSP §ion_sp); - - lldb::SectionWP m_opaque_wp; -}; + SBSection(const lldb::SectionSP §ion_sp); + + lldb::SectionSP GetSP() const; + void SetSP(const lldb::SectionSP §ion_sp); + + lldb::SectionWP m_opaque_wp; +}; } // namespace lldb |