Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 1 | //===-- DWARFContext.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 LLVM_DEBUGINFO_DWARFCONTEXT_H |
| 11 | #define LLVM_DEBUGINFO_DWARFCONTEXT_H |
| 12 | |
| 13 | #include "DWARFCompileUnit.h" |
Benjamin Kramer | a6002fd | 2011-09-14 01:09:52 +0000 | [diff] [blame] | 14 | #include "DWARFDebugAranges.h" |
Eli Bendersky | fd08bc1 | 2013-02-05 23:30:58 +0000 | [diff] [blame] | 15 | #include "DWARFDebugFrame.h" |
Benjamin Kramer | 5acab50 | 2011-09-15 02:12:05 +0000 | [diff] [blame] | 16 | #include "DWARFDebugLine.h" |
David Blaikie | 18e7350 | 2013-06-19 21:37:13 +0000 | [diff] [blame] | 17 | #include "DWARFDebugLoc.h" |
Alexey Samsonov | 034e57a | 2012-08-27 07:17:47 +0000 | [diff] [blame] | 18 | #include "DWARFDebugRangeList.h" |
David Blaikie | 03c089c | 2013-09-23 22:44:47 +0000 | [diff] [blame] | 19 | #include "DWARFTypeUnit.h" |
Chandler Carruth | 8a8cd2b | 2014-01-07 11:48:04 +0000 | [diff] [blame^] | 20 | #include "llvm/ADT/MapVector.h" |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 21 | #include "llvm/ADT/OwningPtr.h" |
| 22 | #include "llvm/ADT/SmallVector.h" |
Chandler Carruth | 802d755 | 2012-12-04 07:12:27 +0000 | [diff] [blame] | 23 | #include "llvm/DebugInfo/DIContext.h" |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 24 | |
| 25 | namespace llvm { |
| 26 | |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 27 | /// DWARFContext |
| 28 | /// This data structure is the top level entity that deals with dwarf debug |
| 29 | /// information parsing. The actual data is supplied through pure virtual |
| 30 | /// methods that a concrete implementation provides. |
| 31 | class DWARFContext : public DIContext { |
Alexey Samsonov | a9debbf | 2013-08-23 06:56:01 +0000 | [diff] [blame] | 32 | SmallVector<DWARFCompileUnit *, 1> CUs; |
David Blaikie | 03c089c | 2013-09-23 22:44:47 +0000 | [diff] [blame] | 33 | SmallVector<DWARFTypeUnit *, 1> TUs; |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 34 | OwningPtr<DWARFDebugAbbrev> Abbrev; |
David Blaikie | 18e7350 | 2013-06-19 21:37:13 +0000 | [diff] [blame] | 35 | OwningPtr<DWARFDebugLoc> Loc; |
Benjamin Kramer | a6002fd | 2011-09-14 01:09:52 +0000 | [diff] [blame] | 36 | OwningPtr<DWARFDebugAranges> Aranges; |
Benjamin Kramer | 5acab50 | 2011-09-15 02:12:05 +0000 | [diff] [blame] | 37 | OwningPtr<DWARFDebugLine> Line; |
Eli Bendersky | fd08bc1 | 2013-02-05 23:30:58 +0000 | [diff] [blame] | 38 | OwningPtr<DWARFDebugFrame> DebugFrame; |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 39 | |
Alexey Samsonov | a9debbf | 2013-08-23 06:56:01 +0000 | [diff] [blame] | 40 | SmallVector<DWARFCompileUnit *, 1> DWOCUs; |
Eric Christopher | da4b219 | 2013-01-02 23:52:13 +0000 | [diff] [blame] | 41 | OwningPtr<DWARFDebugAbbrev> AbbrevDWO; |
| 42 | |
Craig Topper | b1d83e8 | 2012-09-18 02:01:41 +0000 | [diff] [blame] | 43 | DWARFContext(DWARFContext &) LLVM_DELETED_FUNCTION; |
| 44 | DWARFContext &operator=(DWARFContext &) LLVM_DELETED_FUNCTION; |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 45 | |
| 46 | /// Read compile units from the debug_info section and store them in CUs. |
| 47 | void parseCompileUnits(); |
Eric Christopher | 7370b55 | 2012-11-12 21:40:38 +0000 | [diff] [blame] | 48 | |
David Blaikie | 03c089c | 2013-09-23 22:44:47 +0000 | [diff] [blame] | 49 | /// Read type units from the debug_types sections and store them in CUs. |
| 50 | void parseTypeUnits(); |
| 51 | |
Eric Christopher | da4b219 | 2013-01-02 23:52:13 +0000 | [diff] [blame] | 52 | /// Read compile units from the debug_info.dwo section and store them in |
| 53 | /// DWOCUs. |
| 54 | void parseDWOCompileUnits(); |
| 55 | |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 56 | public: |
David Blaikie | 1b5ee5d | 2013-09-23 17:42:01 +0000 | [diff] [blame] | 57 | struct Section { |
| 58 | StringRef Data; |
| 59 | RelocAddrMap Relocs; |
| 60 | }; |
| 61 | |
Alexey Samsonov | c2e0087 | 2013-08-06 10:32:39 +0000 | [diff] [blame] | 62 | DWARFContext() : DIContext(CK_DWARF) {} |
Alexey Samsonov | a9debbf | 2013-08-23 06:56:01 +0000 | [diff] [blame] | 63 | virtual ~DWARFContext(); |
Alexey Samsonov | c2e0087 | 2013-08-06 10:32:39 +0000 | [diff] [blame] | 64 | |
| 65 | static bool classof(const DIContext *DICtx) { |
| 66 | return DICtx->getKind() == CK_DWARF; |
| 67 | } |
| 68 | |
Eli Bendersky | 7a94daa | 2013-01-25 20:26:43 +0000 | [diff] [blame] | 69 | virtual void dump(raw_ostream &OS, DIDumpType DumpType = DIDT_All); |
Eric Christopher | 7c678de | 2012-11-07 23:22:07 +0000 | [diff] [blame] | 70 | |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 71 | /// Get the number of compile units in this context. |
| 72 | unsigned getNumCompileUnits() { |
| 73 | if (CUs.empty()) |
| 74 | parseCompileUnits(); |
| 75 | return CUs.size(); |
| 76 | } |
Eric Christopher | da4b219 | 2013-01-02 23:52:13 +0000 | [diff] [blame] | 77 | |
David Blaikie | 03c089c | 2013-09-23 22:44:47 +0000 | [diff] [blame] | 78 | /// Get the number of compile units in this context. |
| 79 | unsigned getNumTypeUnits() { |
| 80 | if (TUs.empty()) |
| 81 | parseTypeUnits(); |
| 82 | return TUs.size(); |
| 83 | } |
| 84 | |
Eric Christopher | da4b219 | 2013-01-02 23:52:13 +0000 | [diff] [blame] | 85 | /// Get the number of compile units in the DWO context. |
| 86 | unsigned getNumDWOCompileUnits() { |
| 87 | if (DWOCUs.empty()) |
| 88 | parseDWOCompileUnits(); |
| 89 | return DWOCUs.size(); |
| 90 | } |
| 91 | |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 92 | /// Get the compile unit at the specified index for this compile unit. |
| 93 | DWARFCompileUnit *getCompileUnitAtIndex(unsigned index) { |
| 94 | if (CUs.empty()) |
| 95 | parseCompileUnits(); |
Alexey Samsonov | a9debbf | 2013-08-23 06:56:01 +0000 | [diff] [blame] | 96 | return CUs[index]; |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 97 | } |
| 98 | |
David Blaikie | 03c089c | 2013-09-23 22:44:47 +0000 | [diff] [blame] | 99 | /// Get the type unit at the specified index for this compile unit. |
| 100 | DWARFTypeUnit *getTypeUnitAtIndex(unsigned index) { |
| 101 | if (TUs.empty()) |
| 102 | parseTypeUnits(); |
| 103 | return TUs[index]; |
| 104 | } |
| 105 | |
Eric Christopher | da4b219 | 2013-01-02 23:52:13 +0000 | [diff] [blame] | 106 | /// Get the compile unit at the specified index for the DWO compile units. |
| 107 | DWARFCompileUnit *getDWOCompileUnitAtIndex(unsigned index) { |
| 108 | if (DWOCUs.empty()) |
| 109 | parseDWOCompileUnits(); |
Alexey Samsonov | a9debbf | 2013-08-23 06:56:01 +0000 | [diff] [blame] | 110 | return DWOCUs[index]; |
Eric Christopher | da4b219 | 2013-01-02 23:52:13 +0000 | [diff] [blame] | 111 | } |
| 112 | |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 113 | /// Get a pointer to the parsed DebugAbbrev object. |
| 114 | const DWARFDebugAbbrev *getDebugAbbrev(); |
| 115 | |
David Blaikie | 18e7350 | 2013-06-19 21:37:13 +0000 | [diff] [blame] | 116 | /// Get a pointer to the parsed DebugLoc object. |
| 117 | const DWARFDebugLoc *getDebugLoc(); |
| 118 | |
Eric Christopher | da4b219 | 2013-01-02 23:52:13 +0000 | [diff] [blame] | 119 | /// Get a pointer to the parsed dwo abbreviations object. |
| 120 | const DWARFDebugAbbrev *getDebugAbbrevDWO(); |
| 121 | |
Benjamin Kramer | a6002fd | 2011-09-14 01:09:52 +0000 | [diff] [blame] | 122 | /// Get a pointer to the parsed DebugAranges object. |
| 123 | const DWARFDebugAranges *getDebugAranges(); |
| 124 | |
Eli Bendersky | fd08bc1 | 2013-02-05 23:30:58 +0000 | [diff] [blame] | 125 | /// Get a pointer to the parsed frame information object. |
| 126 | const DWARFDebugFrame *getDebugFrame(); |
| 127 | |
Benjamin Kramer | 679e175 | 2011-09-15 20:43:18 +0000 | [diff] [blame] | 128 | /// Get a pointer to a parsed line table corresponding to a compile unit. |
| 129 | const DWARFDebugLine::LineTable * |
| 130 | getLineTableForCompileUnit(DWARFCompileUnit *cu); |
Benjamin Kramer | 5acab50 | 2011-09-15 02:12:05 +0000 | [diff] [blame] | 131 | |
Alexey Samsonov | 45be793 | 2012-08-30 07:49:50 +0000 | [diff] [blame] | 132 | virtual DILineInfo getLineInfoForAddress(uint64_t Address, |
| 133 | DILineInfoSpecifier Specifier = DILineInfoSpecifier()); |
Andrew Kaylor | 9a8ff81 | 2013-01-26 00:28:05 +0000 | [diff] [blame] | 134 | virtual DILineInfoTable getLineInfoForAddressRange(uint64_t Address, |
| 135 | uint64_t Size, DILineInfoSpecifier Specifier = DILineInfoSpecifier()); |
Alexey Samsonov | c942e6b | 2012-09-04 08:12:33 +0000 | [diff] [blame] | 136 | virtual DIInliningInfo getInliningInfoForAddress(uint64_t Address, |
| 137 | DILineInfoSpecifier Specifier = DILineInfoSpecifier()); |
Benjamin Kramer | 2602ca6 | 2011-09-15 20:43:22 +0000 | [diff] [blame] | 138 | |
Eric Christopher | 7370b55 | 2012-11-12 21:40:38 +0000 | [diff] [blame] | 139 | virtual bool isLittleEndian() const = 0; |
Eli Bendersky | fd08bc1 | 2013-02-05 23:30:58 +0000 | [diff] [blame] | 140 | virtual uint8_t getAddressSize() const = 0; |
David Blaikie | 1b5ee5d | 2013-09-23 17:42:01 +0000 | [diff] [blame] | 141 | virtual const Section &getInfoSection() = 0; |
David Blaikie | bc56327 | 2013-12-13 21:33:40 +0000 | [diff] [blame] | 142 | typedef MapVector<object::SectionRef, Section, |
| 143 | std::map<object::SectionRef, unsigned> > TypeSectionMap; |
| 144 | virtual const TypeSectionMap &getTypesSections() = 0; |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 145 | virtual StringRef getAbbrevSection() = 0; |
David Blaikie | 1b5ee5d | 2013-09-23 17:42:01 +0000 | [diff] [blame] | 146 | virtual const Section &getLocSection() = 0; |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 147 | virtual StringRef getARangeSection() = 0; |
Eli Bendersky | fd08bc1 | 2013-02-05 23:30:58 +0000 | [diff] [blame] | 148 | virtual StringRef getDebugFrameSection() = 0; |
David Blaikie | 1b5ee5d | 2013-09-23 17:42:01 +0000 | [diff] [blame] | 149 | virtual const Section &getLineSection() = 0; |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 150 | virtual StringRef getStringSection() = 0; |
Alexey Samsonov | 034e57a | 2012-08-27 07:17:47 +0000 | [diff] [blame] | 151 | virtual StringRef getRangeSection() = 0; |
Krzysztof Parzyszek | 97438dc | 2013-02-12 16:20:28 +0000 | [diff] [blame] | 152 | virtual StringRef getPubNamesSection() = 0; |
Eric Christopher | 4c7e6ba | 2013-09-25 23:02:41 +0000 | [diff] [blame] | 153 | virtual StringRef getPubTypesSection() = 0; |
David Blaikie | 404d304 | 2013-09-19 23:01:29 +0000 | [diff] [blame] | 154 | virtual StringRef getGnuPubNamesSection() = 0; |
David Blaikie | ecd21ff | 2013-09-24 19:50:00 +0000 | [diff] [blame] | 155 | virtual StringRef getGnuPubTypesSection() = 0; |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 156 | |
Eric Christopher | da4b219 | 2013-01-02 23:52:13 +0000 | [diff] [blame] | 157 | // Sections for DWARF5 split dwarf proposal. |
David Blaikie | 1b5ee5d | 2013-09-23 17:42:01 +0000 | [diff] [blame] | 158 | virtual const Section &getInfoDWOSection() = 0; |
Eric Christopher | da4b219 | 2013-01-02 23:52:13 +0000 | [diff] [blame] | 159 | virtual StringRef getAbbrevDWOSection() = 0; |
| 160 | virtual StringRef getStringDWOSection() = 0; |
Eric Christopher | 2cbd576 | 2013-01-07 19:32:41 +0000 | [diff] [blame] | 161 | virtual StringRef getStringOffsetDWOSection() = 0; |
Eric Christopher | da4b219 | 2013-01-02 23:52:13 +0000 | [diff] [blame] | 162 | virtual StringRef getRangeDWOSection() = 0; |
Eric Christopher | 962c908 | 2013-01-15 23:56:56 +0000 | [diff] [blame] | 163 | virtual StringRef getAddrSection() = 0; |
Eric Christopher | da4b219 | 2013-01-02 23:52:13 +0000 | [diff] [blame] | 164 | |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 165 | static bool isSupportedVersion(unsigned version) { |
Eric Christopher | f7d848d | 2013-08-06 01:38:27 +0000 | [diff] [blame] | 166 | return version == 2 || version == 3 || version == 4; |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 167 | } |
Alexey Samsonov | 45be793 | 2012-08-30 07:49:50 +0000 | [diff] [blame] | 168 | private: |
| 169 | /// Return the compile unit that includes an offset (relative to .debug_info). |
| 170 | DWARFCompileUnit *getCompileUnitForOffset(uint32_t Offset); |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 171 | |
Alexey Samsonov | 45be793 | 2012-08-30 07:49:50 +0000 | [diff] [blame] | 172 | /// Return the compile unit which contains instruction with provided |
| 173 | /// address. |
| 174 | DWARFCompileUnit *getCompileUnitForAddress(uint64_t Address); |
Alexey Samsonov | 45be793 | 2012-08-30 07:49:50 +0000 | [diff] [blame] | 175 | }; |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 176 | |
| 177 | /// DWARFContextInMemory is the simplest possible implementation of a |
| 178 | /// DWARFContext. It assumes all content is available in memory and stores |
| 179 | /// pointers to it. |
| 180 | class DWARFContextInMemory : public DWARFContext { |
David Blaikie | a379b181 | 2011-12-20 02:50:00 +0000 | [diff] [blame] | 181 | virtual void anchor(); |
Eric Christopher | 7370b55 | 2012-11-12 21:40:38 +0000 | [diff] [blame] | 182 | bool IsLittleEndian; |
Eli Bendersky | fd08bc1 | 2013-02-05 23:30:58 +0000 | [diff] [blame] | 183 | uint8_t AddressSize; |
David Blaikie | 1b5ee5d | 2013-09-23 17:42:01 +0000 | [diff] [blame] | 184 | Section InfoSection; |
David Blaikie | bc56327 | 2013-12-13 21:33:40 +0000 | [diff] [blame] | 185 | TypeSectionMap TypesSections; |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 186 | StringRef AbbrevSection; |
David Blaikie | 1b5ee5d | 2013-09-23 17:42:01 +0000 | [diff] [blame] | 187 | Section LocSection; |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 188 | StringRef ARangeSection; |
Eli Bendersky | fd08bc1 | 2013-02-05 23:30:58 +0000 | [diff] [blame] | 189 | StringRef DebugFrameSection; |
David Blaikie | 1b5ee5d | 2013-09-23 17:42:01 +0000 | [diff] [blame] | 190 | Section LineSection; |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 191 | StringRef StringSection; |
Alexey Samsonov | 034e57a | 2012-08-27 07:17:47 +0000 | [diff] [blame] | 192 | StringRef RangeSection; |
Krzysztof Parzyszek | 97438dc | 2013-02-12 16:20:28 +0000 | [diff] [blame] | 193 | StringRef PubNamesSection; |
Eric Christopher | 4c7e6ba | 2013-09-25 23:02:41 +0000 | [diff] [blame] | 194 | StringRef PubTypesSection; |
David Blaikie | 404d304 | 2013-09-19 23:01:29 +0000 | [diff] [blame] | 195 | StringRef GnuPubNamesSection; |
David Blaikie | ecd21ff | 2013-09-24 19:50:00 +0000 | [diff] [blame] | 196 | StringRef GnuPubTypesSection; |
Eric Christopher | da4b219 | 2013-01-02 23:52:13 +0000 | [diff] [blame] | 197 | |
| 198 | // Sections for DWARF5 split dwarf proposal. |
David Blaikie | 1b5ee5d | 2013-09-23 17:42:01 +0000 | [diff] [blame] | 199 | Section InfoDWOSection; |
Eric Christopher | da4b219 | 2013-01-02 23:52:13 +0000 | [diff] [blame] | 200 | StringRef AbbrevDWOSection; |
| 201 | StringRef StringDWOSection; |
Eric Christopher | 2cbd576 | 2013-01-07 19:32:41 +0000 | [diff] [blame] | 202 | StringRef StringOffsetDWOSection; |
Eric Christopher | da4b219 | 2013-01-02 23:52:13 +0000 | [diff] [blame] | 203 | StringRef RangeDWOSection; |
Eric Christopher | 962c908 | 2013-01-15 23:56:56 +0000 | [diff] [blame] | 204 | StringRef AddrSection; |
Eric Christopher | da4b219 | 2013-01-02 23:52:13 +0000 | [diff] [blame] | 205 | |
Alexey Samsonov | 068fc8a | 2013-04-23 10:17:34 +0000 | [diff] [blame] | 206 | SmallVector<MemoryBuffer*, 4> UncompressedSections; |
| 207 | |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 208 | public: |
Eric Christopher | 7370b55 | 2012-11-12 21:40:38 +0000 | [diff] [blame] | 209 | DWARFContextInMemory(object::ObjectFile *); |
Alexey Samsonov | 068fc8a | 2013-04-23 10:17:34 +0000 | [diff] [blame] | 210 | ~DWARFContextInMemory(); |
Eric Christopher | 7370b55 | 2012-11-12 21:40:38 +0000 | [diff] [blame] | 211 | virtual bool isLittleEndian() const { return IsLittleEndian; } |
Eli Bendersky | fd08bc1 | 2013-02-05 23:30:58 +0000 | [diff] [blame] | 212 | virtual uint8_t getAddressSize() const { return AddressSize; } |
David Blaikie | 1b5ee5d | 2013-09-23 17:42:01 +0000 | [diff] [blame] | 213 | virtual const Section &getInfoSection() { return InfoSection; } |
David Blaikie | bc56327 | 2013-12-13 21:33:40 +0000 | [diff] [blame] | 214 | virtual const TypeSectionMap &getTypesSections() { return TypesSections; } |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 215 | virtual StringRef getAbbrevSection() { return AbbrevSection; } |
David Blaikie | 1b5ee5d | 2013-09-23 17:42:01 +0000 | [diff] [blame] | 216 | virtual const Section &getLocSection() { return LocSection; } |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 217 | virtual StringRef getARangeSection() { return ARangeSection; } |
Eli Bendersky | fd08bc1 | 2013-02-05 23:30:58 +0000 | [diff] [blame] | 218 | virtual StringRef getDebugFrameSection() { return DebugFrameSection; } |
David Blaikie | 1b5ee5d | 2013-09-23 17:42:01 +0000 | [diff] [blame] | 219 | virtual const Section &getLineSection() { return LineSection; } |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 220 | virtual StringRef getStringSection() { return StringSection; } |
Alexey Samsonov | 034e57a | 2012-08-27 07:17:47 +0000 | [diff] [blame] | 221 | virtual StringRef getRangeSection() { return RangeSection; } |
Krzysztof Parzyszek | 97438dc | 2013-02-12 16:20:28 +0000 | [diff] [blame] | 222 | virtual StringRef getPubNamesSection() { return PubNamesSection; } |
Eric Christopher | 4c7e6ba | 2013-09-25 23:02:41 +0000 | [diff] [blame] | 223 | virtual StringRef getPubTypesSection() { return PubTypesSection; } |
David Blaikie | 404d304 | 2013-09-19 23:01:29 +0000 | [diff] [blame] | 224 | virtual StringRef getGnuPubNamesSection() { return GnuPubNamesSection; } |
David Blaikie | ecd21ff | 2013-09-24 19:50:00 +0000 | [diff] [blame] | 225 | virtual StringRef getGnuPubTypesSection() { return GnuPubTypesSection; } |
Eric Christopher | da4b219 | 2013-01-02 23:52:13 +0000 | [diff] [blame] | 226 | |
| 227 | // Sections for DWARF5 split dwarf proposal. |
David Blaikie | 1b5ee5d | 2013-09-23 17:42:01 +0000 | [diff] [blame] | 228 | virtual const Section &getInfoDWOSection() { return InfoDWOSection; } |
Eric Christopher | da4b219 | 2013-01-02 23:52:13 +0000 | [diff] [blame] | 229 | virtual StringRef getAbbrevDWOSection() { return AbbrevDWOSection; } |
| 230 | virtual StringRef getStringDWOSection() { return StringDWOSection; } |
Eric Christopher | 2cbd576 | 2013-01-07 19:32:41 +0000 | [diff] [blame] | 231 | virtual StringRef getStringOffsetDWOSection() { |
| 232 | return StringOffsetDWOSection; |
| 233 | } |
Eric Christopher | da4b219 | 2013-01-02 23:52:13 +0000 | [diff] [blame] | 234 | virtual StringRef getRangeDWOSection() { return RangeDWOSection; } |
Eric Christopher | 962c908 | 2013-01-15 23:56:56 +0000 | [diff] [blame] | 235 | virtual StringRef getAddrSection() { |
| 236 | return AddrSection; |
| 237 | } |
Benjamin Kramer | aa2f78f | 2011-09-13 19:42:23 +0000 | [diff] [blame] | 238 | }; |
| 239 | |
| 240 | } |
| 241 | |
| 242 | #endif |