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