abhishek.aggarwal updated this revision to Diff 70677. abhishek.aggarwal added a comment.
Removed get() for shared_ptr https://reviews.llvm.org/D24251 Files: include/lldb/API/SBSection.h scripts/interface/SBSection.i source/API/SBSection.cpp Index: source/API/SBSection.cpp =================================================================== --- source/API/SBSection.cpp +++ source/API/SBSection.cpp @@ -251,6 +251,15 @@ } uint32_t +SBSection::GetPermissions() const +{ + SectionSP section_sp(GetSP()); + if (section_sp) + return section_sp->GetPermissions(); + return 0; +} + +uint32_t SBSection::GetTargetByteSize () { SectionSP section_sp (GetSP()); Index: scripts/interface/SBSection.i =================================================================== --- scripts/interface/SBSection.i +++ scripts/interface/SBSection.i @@ -90,6 +90,9 @@ SectionType GetSectionType (); + uint32_t + GetPermissions() const; + %feature("docstring", " //------------------------------------------------------------------ /// Return the size of a target's byte represented by this section Index: include/lldb/API/SBSection.h =================================================================== --- include/lldb/API/SBSection.h +++ include/lldb/API/SBSection.h @@ -72,6 +72,21 @@ 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
Index: source/API/SBSection.cpp =================================================================== --- source/API/SBSection.cpp +++ source/API/SBSection.cpp @@ -251,6 +251,15 @@ } uint32_t +SBSection::GetPermissions() const +{ + SectionSP section_sp(GetSP()); + if (section_sp) + return section_sp->GetPermissions(); + return 0; +} + +uint32_t SBSection::GetTargetByteSize () { SectionSP section_sp (GetSP()); Index: scripts/interface/SBSection.i =================================================================== --- scripts/interface/SBSection.i +++ scripts/interface/SBSection.i @@ -90,6 +90,9 @@ SectionType GetSectionType (); + uint32_t + GetPermissions() const; + %feature("docstring", " //------------------------------------------------------------------ /// Return the size of a target's byte represented by this section Index: include/lldb/API/SBSection.h =================================================================== --- include/lldb/API/SBSection.h +++ include/lldb/API/SBSection.h @@ -72,6 +72,21 @@ 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
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits