Skip to content

Commit 918b1e7

Browse files
committed
Revert "[lldb] add SBSection.alignment to python bindings"
The patch didn't get proper attribution. Will recommit. This reverts commit 4135abc.
1 parent 4135abc commit 918b1e7

File tree

5 files changed

+0
-44
lines changed

5 files changed

+0
-44
lines changed

lldb/bindings/interface/SBSection.i

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,6 @@ public:
105105
uint32_t
106106
GetTargetByteSize ();
107107

108-
uint32_t
109-
GetAlignment ();
110-
111108
bool
112109
GetDescription (lldb::SBStream &description);
113110

@@ -141,7 +138,6 @@ public:
141138
data = property(GetSectionData, None, doc='''A read only property that returns an lldb object that represents the bytes for this section (lldb.SBData) for this section.''')
142139
type = property(GetSectionType, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eSectionType") that represents the type of this section (code, data, etc.).''')
143140
target_byte_size = property(GetTargetByteSize, None, doc='''A read only property that returns the size of a target byte represented by this section as a number of host bytes.''')
144-
alignment = property(GetAlignment, None, doc='''A read only property that returns the alignment of this section as a number of host bytes.''')
145141
%}
146142
#endif
147143

lldb/include/lldb/API/SBSection.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,6 @@ class LLDB_API SBSection {
7676
/// The number of host (8-bit) bytes needed to hold a target byte
7777
uint32_t GetTargetByteSize();
7878

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-
8579
bool operator==(const lldb::SBSection &rhs);
8680

8781
bool operator!=(const lldb::SBSection &rhs);

lldb/source/API/SBSection.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -242,15 +242,6 @@ uint32_t SBSection::GetTargetByteSize() {
242242
return 0;
243243
}
244244

245-
uint32_t SBSection::GetAlignment() {
246-
LLDB_INSTRUMENT_VA(this);
247-
248-
SectionSP section_sp(GetSP());
249-
if (section_sp.get())
250-
return (1 << section_sp->GetLog2Align());
251-
return 0;
252-
}
253-
254245
bool SBSection::operator==(const SBSection &rhs) {
255246
LLDB_INSTRUMENT_VA(this, rhs);
256247

lldb/test/API/python_api/section/TestSectionAPI.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,3 @@ def test_get_target_byte_size(self):
3737

3838
self.assertIsNotNone(data_section)
3939
self.assertEqual(data_section.target_byte_size, 1)
40-
41-
def test_get_alignment(self):
42-
exe = self.getBuildArtifact("aligned.out")
43-
self.yaml2obj("aligned.yaml", exe)
44-
target = self.dbg.CreateTarget(exe)
45-
self.assertTrue(target, VALID_TARGET)
46-
47-
# exe contains a single section aligned to 0x1000
48-
section = target.modules[0].sections[0]
49-
self.assertEqual(section.GetAlignment(), 0x1000)
50-
self.assertEqual(section.alignment, 0x1000)

lldb/test/API/python_api/section/aligned.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)