SBSection.h revision 7dd5c51fbab8384b18f20ecc125f9a1bb3c9bcb2
1//===-- SBSection.h ---------------------------------------------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9 10#ifndef LLDB_SBSection_h_ 11#define LLDB_SBSection_h_ 12 13#include "lldb/API/SBDefines.h" 14#include "lldb/API/SBData.h" 15 16namespace lldb { 17 18class SBSection 19{ 20public: 21 22 SBSection (); 23 24 SBSection (const lldb::SBSection &rhs); 25 26 ~SBSection (); 27 28 const lldb::SBSection & 29 operator = (const lldb::SBSection &rhs); 30 31 bool 32 IsValid () const; 33 34 const char * 35 GetName (); 36 37 lldb::SBSection 38 FindSubSection (const char *sect_name); 39 40 size_t 41 GetNumSubSections (); 42 43 lldb::SBSection 44 GetSubSectionAtIndex (size_t idx); 45 46 lldb::addr_t 47 GetFileAddress (); 48 49 lldb::addr_t 50 GetByteSize (); 51 52 uint64_t 53 GetFileOffset (); 54 55 uint64_t 56 GetFileByteSize (); 57 58 lldb::SBData 59 GetSectionData (); 60 61 lldb::SBData 62 GetSectionData (uint64_t offset, 63 uint64_t size); 64 65 SectionType 66 GetSectionType (); 67 68 bool 69 operator == (const lldb::SBSection &rhs); 70 71 bool 72 operator != (const lldb::SBSection &rhs); 73 74 bool 75 GetDescription (lldb::SBStream &description); 76 77private: 78 79 friend class SBAddress; 80 friend class SBModule; 81 friend class SBTarget; 82 83 SBSection (const lldb_private::Section *section); 84 85 const lldb_private::Section * 86 GetSection(); 87 88 void 89 SetSection (const lldb_private::Section *section); 90 91 std::auto_ptr<lldb_private::SectionImpl> m_opaque_ap; 92}; 93 94 95} // namespace lldb 96 97#endif // LLDB_SBSection_h_ 98