1*0b57cec5SDimitry Andric //===-- SBSection.cpp -----------------------------------------------------===//
2*0b57cec5SDimitry Andric //
3*0b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*0b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5*0b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*0b57cec5SDimitry Andric //
7*0b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
8*0b57cec5SDimitry Andric
9*0b57cec5SDimitry Andric #include "lldb/API/SBSection.h"
10*0b57cec5SDimitry Andric #include "SBReproducerPrivate.h"
11*0b57cec5SDimitry Andric #include "lldb/API/SBStream.h"
12*0b57cec5SDimitry Andric #include "lldb/API/SBTarget.h"
13*0b57cec5SDimitry Andric #include "lldb/Core/Module.h"
14*0b57cec5SDimitry Andric #include "lldb/Core/Section.h"
15*0b57cec5SDimitry Andric #include "lldb/Symbol/ObjectFile.h"
16*0b57cec5SDimitry Andric #include "lldb/Utility/DataBuffer.h"
17*0b57cec5SDimitry Andric #include "lldb/Utility/DataExtractor.h"
18*0b57cec5SDimitry Andric #include "lldb/Utility/StreamString.h"
19*0b57cec5SDimitry Andric
20*0b57cec5SDimitry Andric using namespace lldb;
21*0b57cec5SDimitry Andric using namespace lldb_private;
22*0b57cec5SDimitry Andric
SBSection()23*0b57cec5SDimitry Andric SBSection::SBSection() : m_opaque_wp() {
24*0b57cec5SDimitry Andric LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBSection);
25*0b57cec5SDimitry Andric }
26*0b57cec5SDimitry Andric
SBSection(const SBSection & rhs)27*0b57cec5SDimitry Andric SBSection::SBSection(const SBSection &rhs) : m_opaque_wp(rhs.m_opaque_wp) {
28*0b57cec5SDimitry Andric LLDB_RECORD_CONSTRUCTOR(SBSection, (const lldb::SBSection &), rhs);
29*0b57cec5SDimitry Andric }
30*0b57cec5SDimitry Andric
SBSection(const lldb::SectionSP & section_sp)31*0b57cec5SDimitry Andric SBSection::SBSection(const lldb::SectionSP §ion_sp)
32*0b57cec5SDimitry Andric : m_opaque_wp() // Don't init with section_sp otherwise this will throw if
33*0b57cec5SDimitry Andric // section_sp doesn't contain a valid Section *
34*0b57cec5SDimitry Andric {
35*0b57cec5SDimitry Andric if (section_sp)
36*0b57cec5SDimitry Andric m_opaque_wp = section_sp;
37*0b57cec5SDimitry Andric }
38*0b57cec5SDimitry Andric
operator =(const SBSection & rhs)39*0b57cec5SDimitry Andric const SBSection &SBSection::operator=(const SBSection &rhs) {
40*0b57cec5SDimitry Andric LLDB_RECORD_METHOD(const lldb::SBSection &,
41*0b57cec5SDimitry Andric SBSection, operator=,(const lldb::SBSection &), rhs);
42*0b57cec5SDimitry Andric
43*0b57cec5SDimitry Andric m_opaque_wp = rhs.m_opaque_wp;
44*0b57cec5SDimitry Andric return LLDB_RECORD_RESULT(*this);
45*0b57cec5SDimitry Andric }
46*0b57cec5SDimitry Andric
47*0b57cec5SDimitry Andric SBSection::~SBSection() = default;
48*0b57cec5SDimitry Andric
IsValid() const49*0b57cec5SDimitry Andric bool SBSection::IsValid() const {
50*0b57cec5SDimitry Andric LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBSection, IsValid);
51*0b57cec5SDimitry Andric return this->operator bool();
52*0b57cec5SDimitry Andric }
operator bool() const53*0b57cec5SDimitry Andric SBSection::operator bool() const {
54*0b57cec5SDimitry Andric LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBSection, operator bool);
55*0b57cec5SDimitry Andric
56*0b57cec5SDimitry Andric SectionSP section_sp(GetSP());
57*0b57cec5SDimitry Andric return section_sp && section_sp->GetModule().get() != nullptr;
58*0b57cec5SDimitry Andric }
59*0b57cec5SDimitry Andric
GetName()60*0b57cec5SDimitry Andric const char *SBSection::GetName() {
61*0b57cec5SDimitry Andric LLDB_RECORD_METHOD_NO_ARGS(const char *, SBSection, GetName);
62*0b57cec5SDimitry Andric
63*0b57cec5SDimitry Andric SectionSP section_sp(GetSP());
64*0b57cec5SDimitry Andric if (section_sp)
65*0b57cec5SDimitry Andric return section_sp->GetName().GetCString();
66*0b57cec5SDimitry Andric return nullptr;
67*0b57cec5SDimitry Andric }
68*0b57cec5SDimitry Andric
GetParent()69*0b57cec5SDimitry Andric lldb::SBSection SBSection::GetParent() {
70*0b57cec5SDimitry Andric LLDB_RECORD_METHOD_NO_ARGS(lldb::SBSection, SBSection, GetParent);
71*0b57cec5SDimitry Andric
72*0b57cec5SDimitry Andric lldb::SBSection sb_section;
73*0b57cec5SDimitry Andric SectionSP section_sp(GetSP());
74*0b57cec5SDimitry Andric if (section_sp) {
75*0b57cec5SDimitry Andric SectionSP parent_section_sp(section_sp->GetParent());
76*0b57cec5SDimitry Andric if (parent_section_sp)
77*0b57cec5SDimitry Andric sb_section.SetSP(parent_section_sp);
78*0b57cec5SDimitry Andric }
79*0b57cec5SDimitry Andric return LLDB_RECORD_RESULT(sb_section);
80*0b57cec5SDimitry Andric }
81*0b57cec5SDimitry Andric
FindSubSection(const char * sect_name)82*0b57cec5SDimitry Andric lldb::SBSection SBSection::FindSubSection(const char *sect_name) {
83*0b57cec5SDimitry Andric LLDB_RECORD_METHOD(lldb::SBSection, SBSection, FindSubSection, (const char *),
84*0b57cec5SDimitry Andric sect_name);
85*0b57cec5SDimitry Andric
86*0b57cec5SDimitry Andric lldb::SBSection sb_section;
87*0b57cec5SDimitry Andric if (sect_name) {
88*0b57cec5SDimitry Andric SectionSP section_sp(GetSP());
89*0b57cec5SDimitry Andric if (section_sp) {
90*0b57cec5SDimitry Andric ConstString const_sect_name(sect_name);
91*0b57cec5SDimitry Andric sb_section.SetSP(
92*0b57cec5SDimitry Andric section_sp->GetChildren().FindSectionByName(const_sect_name));
93*0b57cec5SDimitry Andric }
94*0b57cec5SDimitry Andric }
95*0b57cec5SDimitry Andric return LLDB_RECORD_RESULT(sb_section);
96*0b57cec5SDimitry Andric }
97*0b57cec5SDimitry Andric
GetNumSubSections()98*0b57cec5SDimitry Andric size_t SBSection::GetNumSubSections() {
99*0b57cec5SDimitry Andric LLDB_RECORD_METHOD_NO_ARGS(size_t, SBSection, GetNumSubSections);
100*0b57cec5SDimitry Andric
101*0b57cec5SDimitry Andric SectionSP section_sp(GetSP());
102*0b57cec5SDimitry Andric if (section_sp)
103*0b57cec5SDimitry Andric return section_sp->GetChildren().GetSize();
104*0b57cec5SDimitry Andric return 0;
105*0b57cec5SDimitry Andric }
106*0b57cec5SDimitry Andric
GetSubSectionAtIndex(size_t idx)107*0b57cec5SDimitry Andric lldb::SBSection SBSection::GetSubSectionAtIndex(size_t idx) {
108*0b57cec5SDimitry Andric LLDB_RECORD_METHOD(lldb::SBSection, SBSection, GetSubSectionAtIndex, (size_t),
109*0b57cec5SDimitry Andric idx);
110*0b57cec5SDimitry Andric
111*0b57cec5SDimitry Andric lldb::SBSection sb_section;
112*0b57cec5SDimitry Andric SectionSP section_sp(GetSP());
113*0b57cec5SDimitry Andric if (section_sp)
114*0b57cec5SDimitry Andric sb_section.SetSP(section_sp->GetChildren().GetSectionAtIndex(idx));
115*0b57cec5SDimitry Andric return LLDB_RECORD_RESULT(sb_section);
116*0b57cec5SDimitry Andric }
117*0b57cec5SDimitry Andric
GetSP() const118*0b57cec5SDimitry Andric lldb::SectionSP SBSection::GetSP() const { return m_opaque_wp.lock(); }
119*0b57cec5SDimitry Andric
SetSP(const lldb::SectionSP & section_sp)120*0b57cec5SDimitry Andric void SBSection::SetSP(const lldb::SectionSP §ion_sp) {
121*0b57cec5SDimitry Andric m_opaque_wp = section_sp;
122*0b57cec5SDimitry Andric }
123*0b57cec5SDimitry Andric
GetFileAddress()124*0b57cec5SDimitry Andric lldb::addr_t SBSection::GetFileAddress() {
125*0b57cec5SDimitry Andric LLDB_RECORD_METHOD_NO_ARGS(lldb::addr_t, SBSection, GetFileAddress);
126*0b57cec5SDimitry Andric
127*0b57cec5SDimitry Andric lldb::addr_t file_addr = LLDB_INVALID_ADDRESS;
128*0b57cec5SDimitry Andric SectionSP section_sp(GetSP());
129*0b57cec5SDimitry Andric if (section_sp)
130*0b57cec5SDimitry Andric return section_sp->GetFileAddress();
131*0b57cec5SDimitry Andric return file_addr;
132*0b57cec5SDimitry Andric }
133*0b57cec5SDimitry Andric
GetLoadAddress(lldb::SBTarget & sb_target)134*0b57cec5SDimitry Andric lldb::addr_t SBSection::GetLoadAddress(lldb::SBTarget &sb_target) {
135*0b57cec5SDimitry Andric LLDB_RECORD_METHOD(lldb::addr_t, SBSection, GetLoadAddress,
136*0b57cec5SDimitry Andric (lldb::SBTarget &), sb_target);
137*0b57cec5SDimitry Andric
138*0b57cec5SDimitry Andric TargetSP target_sp(sb_target.GetSP());
139*0b57cec5SDimitry Andric if (target_sp) {
140*0b57cec5SDimitry Andric SectionSP section_sp(GetSP());
141*0b57cec5SDimitry Andric if (section_sp)
142*0b57cec5SDimitry Andric return section_sp->GetLoadBaseAddress(target_sp.get());
143*0b57cec5SDimitry Andric }
144*0b57cec5SDimitry Andric return LLDB_INVALID_ADDRESS;
145*0b57cec5SDimitry Andric }
146*0b57cec5SDimitry Andric
GetByteSize()147*0b57cec5SDimitry Andric lldb::addr_t SBSection::GetByteSize() {
148*0b57cec5SDimitry Andric LLDB_RECORD_METHOD_NO_ARGS(lldb::addr_t, SBSection, GetByteSize);
149*0b57cec5SDimitry Andric
150*0b57cec5SDimitry Andric SectionSP section_sp(GetSP());
151*0b57cec5SDimitry Andric if (section_sp)
152*0b57cec5SDimitry Andric return section_sp->GetByteSize();
153*0b57cec5SDimitry Andric return 0;
154*0b57cec5SDimitry Andric }
155*0b57cec5SDimitry Andric
GetFileOffset()156*0b57cec5SDimitry Andric uint64_t SBSection::GetFileOffset() {
157*0b57cec5SDimitry Andric LLDB_RECORD_METHOD_NO_ARGS(uint64_t, SBSection, GetFileOffset);
158*0b57cec5SDimitry Andric
159*0b57cec5SDimitry Andric SectionSP section_sp(GetSP());
160*0b57cec5SDimitry Andric if (section_sp) {
161*0b57cec5SDimitry Andric ModuleSP module_sp(section_sp->GetModule());
162*0b57cec5SDimitry Andric if (module_sp) {
163*0b57cec5SDimitry Andric ObjectFile *objfile = module_sp->GetObjectFile();
164*0b57cec5SDimitry Andric if (objfile)
165*0b57cec5SDimitry Andric return objfile->GetFileOffset() + section_sp->GetFileOffset();
166*0b57cec5SDimitry Andric }
167*0b57cec5SDimitry Andric }
168*0b57cec5SDimitry Andric return UINT64_MAX;
169*0b57cec5SDimitry Andric }
170*0b57cec5SDimitry Andric
GetFileByteSize()171*0b57cec5SDimitry Andric uint64_t SBSection::GetFileByteSize() {
172*0b57cec5SDimitry Andric LLDB_RECORD_METHOD_NO_ARGS(uint64_t, SBSection, GetFileByteSize);
173*0b57cec5SDimitry Andric
174*0b57cec5SDimitry Andric SectionSP section_sp(GetSP());
175*0b57cec5SDimitry Andric if (section_sp)
176*0b57cec5SDimitry Andric return section_sp->GetFileSize();
177*0b57cec5SDimitry Andric return 0;
178*0b57cec5SDimitry Andric }
179*0b57cec5SDimitry Andric
GetSectionData()180*0b57cec5SDimitry Andric SBData SBSection::GetSectionData() {
181*0b57cec5SDimitry Andric LLDB_RECORD_METHOD_NO_ARGS(lldb::SBData, SBSection, GetSectionData);
182*0b57cec5SDimitry Andric
183*0b57cec5SDimitry Andric return LLDB_RECORD_RESULT(GetSectionData(0, UINT64_MAX));
184*0b57cec5SDimitry Andric }
185*0b57cec5SDimitry Andric
GetSectionData(uint64_t offset,uint64_t size)186*0b57cec5SDimitry Andric SBData SBSection::GetSectionData(uint64_t offset, uint64_t size) {
187*0b57cec5SDimitry Andric LLDB_RECORD_METHOD(lldb::SBData, SBSection, GetSectionData,
188*0b57cec5SDimitry Andric (uint64_t, uint64_t), offset, size);
189*0b57cec5SDimitry Andric
190*0b57cec5SDimitry Andric SBData sb_data;
191*0b57cec5SDimitry Andric SectionSP section_sp(GetSP());
192*0b57cec5SDimitry Andric if (section_sp) {
193*0b57cec5SDimitry Andric const uint64_t sect_file_size = section_sp->GetFileSize();
194*0b57cec5SDimitry Andric if (sect_file_size > 0) {
195*0b57cec5SDimitry Andric ModuleSP module_sp(section_sp->GetModule());
196*0b57cec5SDimitry Andric if (module_sp) {
197*0b57cec5SDimitry Andric ObjectFile *objfile = module_sp->GetObjectFile();
198*0b57cec5SDimitry Andric if (objfile) {
199*0b57cec5SDimitry Andric const uint64_t sect_file_offset =
200*0b57cec5SDimitry Andric objfile->GetFileOffset() + section_sp->GetFileOffset();
201*0b57cec5SDimitry Andric const uint64_t file_offset = sect_file_offset + offset;
202*0b57cec5SDimitry Andric uint64_t file_size = size;
203*0b57cec5SDimitry Andric if (file_size == UINT64_MAX) {
204*0b57cec5SDimitry Andric file_size = section_sp->GetByteSize();
205*0b57cec5SDimitry Andric if (file_size > offset)
206*0b57cec5SDimitry Andric file_size -= offset;
207*0b57cec5SDimitry Andric else
208*0b57cec5SDimitry Andric file_size = 0;
209*0b57cec5SDimitry Andric }
210*0b57cec5SDimitry Andric auto data_buffer_sp = FileSystem::Instance().CreateDataBuffer(
211*0b57cec5SDimitry Andric objfile->GetFileSpec().GetPath(), file_size, file_offset);
212*0b57cec5SDimitry Andric if (data_buffer_sp && data_buffer_sp->GetByteSize() > 0) {
213*0b57cec5SDimitry Andric DataExtractorSP data_extractor_sp(
214*0b57cec5SDimitry Andric new DataExtractor(data_buffer_sp, objfile->GetByteOrder(),
215*0b57cec5SDimitry Andric objfile->GetAddressByteSize()));
216*0b57cec5SDimitry Andric
217*0b57cec5SDimitry Andric sb_data.SetOpaque(data_extractor_sp);
218*0b57cec5SDimitry Andric }
219*0b57cec5SDimitry Andric }
220*0b57cec5SDimitry Andric }
221*0b57cec5SDimitry Andric }
222*0b57cec5SDimitry Andric }
223*0b57cec5SDimitry Andric return LLDB_RECORD_RESULT(sb_data);
224*0b57cec5SDimitry Andric }
225*0b57cec5SDimitry Andric
GetSectionType()226*0b57cec5SDimitry Andric SectionType SBSection::GetSectionType() {
227*0b57cec5SDimitry Andric LLDB_RECORD_METHOD_NO_ARGS(lldb::SectionType, SBSection, GetSectionType);
228*0b57cec5SDimitry Andric
229*0b57cec5SDimitry Andric SectionSP section_sp(GetSP());
230*0b57cec5SDimitry Andric if (section_sp.get())
231*0b57cec5SDimitry Andric return section_sp->GetType();
232*0b57cec5SDimitry Andric return eSectionTypeInvalid;
233*0b57cec5SDimitry Andric }
234*0b57cec5SDimitry Andric
GetPermissions() const235*0b57cec5SDimitry Andric uint32_t SBSection::GetPermissions() const {
236*0b57cec5SDimitry Andric LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBSection, GetPermissions);
237*0b57cec5SDimitry Andric
238*0b57cec5SDimitry Andric SectionSP section_sp(GetSP());
239*0b57cec5SDimitry Andric if (section_sp)
240*0b57cec5SDimitry Andric return section_sp->GetPermissions();
241*0b57cec5SDimitry Andric return 0;
242*0b57cec5SDimitry Andric }
243*0b57cec5SDimitry Andric
GetTargetByteSize()244*0b57cec5SDimitry Andric uint32_t SBSection::GetTargetByteSize() {
245*0b57cec5SDimitry Andric LLDB_RECORD_METHOD_NO_ARGS(uint32_t, SBSection, GetTargetByteSize);
246*0b57cec5SDimitry Andric
247*0b57cec5SDimitry Andric SectionSP section_sp(GetSP());
248*0b57cec5SDimitry Andric if (section_sp.get())
249*0b57cec5SDimitry Andric return section_sp->GetTargetByteSize();
250*0b57cec5SDimitry Andric return 0;
251*0b57cec5SDimitry Andric }
252*0b57cec5SDimitry Andric
operator ==(const SBSection & rhs)253*0b57cec5SDimitry Andric bool SBSection::operator==(const SBSection &rhs) {
254*0b57cec5SDimitry Andric LLDB_RECORD_METHOD(bool, SBSection, operator==,(const lldb::SBSection &),
255*0b57cec5SDimitry Andric rhs);
256*0b57cec5SDimitry Andric
257*0b57cec5SDimitry Andric SectionSP lhs_section_sp(GetSP());
258*0b57cec5SDimitry Andric SectionSP rhs_section_sp(rhs.GetSP());
259*0b57cec5SDimitry Andric if (lhs_section_sp && rhs_section_sp)
260*0b57cec5SDimitry Andric return lhs_section_sp == rhs_section_sp;
261*0b57cec5SDimitry Andric return false;
262*0b57cec5SDimitry Andric }
263*0b57cec5SDimitry Andric
operator !=(const SBSection & rhs)264*0b57cec5SDimitry Andric bool SBSection::operator!=(const SBSection &rhs) {
265*0b57cec5SDimitry Andric LLDB_RECORD_METHOD(bool, SBSection, operator!=,(const lldb::SBSection &),
266*0b57cec5SDimitry Andric rhs);
267*0b57cec5SDimitry Andric
268*0b57cec5SDimitry Andric SectionSP lhs_section_sp(GetSP());
269*0b57cec5SDimitry Andric SectionSP rhs_section_sp(rhs.GetSP());
270*0b57cec5SDimitry Andric return lhs_section_sp != rhs_section_sp;
271*0b57cec5SDimitry Andric }
272*0b57cec5SDimitry Andric
GetDescription(SBStream & description)273*0b57cec5SDimitry Andric bool SBSection::GetDescription(SBStream &description) {
274*0b57cec5SDimitry Andric LLDB_RECORD_METHOD(bool, SBSection, GetDescription, (lldb::SBStream &),
275*0b57cec5SDimitry Andric description);
276*0b57cec5SDimitry Andric
277*0b57cec5SDimitry Andric Stream &strm = description.ref();
278*0b57cec5SDimitry Andric
279*0b57cec5SDimitry Andric SectionSP section_sp(GetSP());
280*0b57cec5SDimitry Andric if (section_sp) {
281*0b57cec5SDimitry Andric const addr_t file_addr = section_sp->GetFileAddress();
282*0b57cec5SDimitry Andric strm.Printf("[0x%16.16" PRIx64 "-0x%16.16" PRIx64 ") ", file_addr,
283*0b57cec5SDimitry Andric file_addr + section_sp->GetByteSize());
284*0b57cec5SDimitry Andric section_sp->DumpName(strm.AsRawOstream());
285*0b57cec5SDimitry Andric } else {
286*0b57cec5SDimitry Andric strm.PutCString("No value");
287*0b57cec5SDimitry Andric }
288*0b57cec5SDimitry Andric
289*0b57cec5SDimitry Andric return true;
290*0b57cec5SDimitry Andric }
291*0b57cec5SDimitry Andric
292*0b57cec5SDimitry Andric namespace lldb_private {
293*0b57cec5SDimitry Andric namespace repro {
294*0b57cec5SDimitry Andric
295*0b57cec5SDimitry Andric template <>
RegisterMethods(Registry & R)296*0b57cec5SDimitry Andric void RegisterMethods<SBSection>(Registry &R) {
297*0b57cec5SDimitry Andric LLDB_REGISTER_CONSTRUCTOR(SBSection, ());
298*0b57cec5SDimitry Andric LLDB_REGISTER_CONSTRUCTOR(SBSection, (const lldb::SBSection &));
299*0b57cec5SDimitry Andric LLDB_REGISTER_METHOD(const lldb::SBSection &,
300*0b57cec5SDimitry Andric SBSection, operator=,(const lldb::SBSection &));
301*0b57cec5SDimitry Andric LLDB_REGISTER_METHOD_CONST(bool, SBSection, IsValid, ());
302*0b57cec5SDimitry Andric LLDB_REGISTER_METHOD_CONST(bool, SBSection, operator bool, ());
303*0b57cec5SDimitry Andric LLDB_REGISTER_METHOD(const char *, SBSection, GetName, ());
304*0b57cec5SDimitry Andric LLDB_REGISTER_METHOD(lldb::SBSection, SBSection, GetParent, ());
305*0b57cec5SDimitry Andric LLDB_REGISTER_METHOD(lldb::SBSection, SBSection, FindSubSection,
306*0b57cec5SDimitry Andric (const char *));
307*0b57cec5SDimitry Andric LLDB_REGISTER_METHOD(size_t, SBSection, GetNumSubSections, ());
308*0b57cec5SDimitry Andric LLDB_REGISTER_METHOD(lldb::SBSection, SBSection, GetSubSectionAtIndex,
309*0b57cec5SDimitry Andric (size_t));
310*0b57cec5SDimitry Andric LLDB_REGISTER_METHOD(lldb::addr_t, SBSection, GetFileAddress, ());
311*0b57cec5SDimitry Andric LLDB_REGISTER_METHOD(lldb::addr_t, SBSection, GetLoadAddress,
312*0b57cec5SDimitry Andric (lldb::SBTarget &));
313*0b57cec5SDimitry Andric LLDB_REGISTER_METHOD(lldb::addr_t, SBSection, GetByteSize, ());
314*0b57cec5SDimitry Andric LLDB_REGISTER_METHOD(uint64_t, SBSection, GetFileOffset, ());
315*0b57cec5SDimitry Andric LLDB_REGISTER_METHOD(uint64_t, SBSection, GetFileByteSize, ());
316*0b57cec5SDimitry Andric LLDB_REGISTER_METHOD(lldb::SBData, SBSection, GetSectionData, ());
317*0b57cec5SDimitry Andric LLDB_REGISTER_METHOD(lldb::SBData, SBSection, GetSectionData,
318*0b57cec5SDimitry Andric (uint64_t, uint64_t));
319*0b57cec5SDimitry Andric LLDB_REGISTER_METHOD(lldb::SectionType, SBSection, GetSectionType, ());
320*0b57cec5SDimitry Andric LLDB_REGISTER_METHOD_CONST(uint32_t, SBSection, GetPermissions, ());
321*0b57cec5SDimitry Andric LLDB_REGISTER_METHOD(uint32_t, SBSection, GetTargetByteSize, ());
322*0b57cec5SDimitry Andric LLDB_REGISTER_METHOD(bool, SBSection, operator==,(const lldb::SBSection &));
323*0b57cec5SDimitry Andric LLDB_REGISTER_METHOD(bool, SBSection, operator!=,(const lldb::SBSection &));
324*0b57cec5SDimitry Andric LLDB_REGISTER_METHOD(bool, SBSection, GetDescription, (lldb::SBStream &));
325*0b57cec5SDimitry Andric }
326*0b57cec5SDimitry Andric
327*0b57cec5SDimitry Andric }
328*0b57cec5SDimitry Andric }
329