diff options
| author | Abhishek Aggarwal <abhishek.a.aggarwal@intel.com> | 2016-09-08 12:22:56 +0000 |
|---|---|---|
| committer | Abhishek Aggarwal <abhishek.a.aggarwal@intel.com> | 2016-09-08 12:22:56 +0000 |
| commit | 3c7f070956c7305656d0bd4a59317c09a5186941 (patch) | |
| tree | 2733efddaf67ba2fbb81681016a09b206c322d83 /lldb/source/API | |
| parent | 2a526feec9e16be2624de041227cfe10d9d39ab4 (diff) | |
| download | bcm5719-llvm-3c7f070956c7305656d0bd4a59317c09a5186941.tar.gz bcm5719-llvm-3c7f070956c7305656d0bd4a59317c09a5186941.zip | |
LLDB: API for iPermission of object file's sections
Summary:
- Added an API to public interface that provides permissions (RWX) of
individual sections of an object file
- Earlier, there was no way to find out this information through SB
APIs
- A possible use case of this API is:
when a user wants to know the sections that have executable machine
instructions and want to write a tool on top of LLDB based on this
information
- Differential Revision: https://reviews.llvm.org/D24251
llvm-svn: 280924
Diffstat (limited to 'lldb/source/API')
| -rw-r--r-- | lldb/source/API/SBSection.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/API/SBSection.cpp b/lldb/source/API/SBSection.cpp index 77d5e25a99a..8124fe94841 100644 --- a/lldb/source/API/SBSection.cpp +++ b/lldb/source/API/SBSection.cpp @@ -188,6 +188,15 @@ SectionType SBSection::GetSectionType() { return eSectionTypeInvalid; } +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()); if (section_sp.get()) |

