summaryrefslogtreecommitdiff
path: root/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h')
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h b/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h
index 8bde63efe188..eb6d0f541c1e 100644
--- a/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h
+++ b/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h
@@ -12,8 +12,8 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/BinaryFormat/Dwarf.h"
+#include "llvm/DebugInfo/DWARF/DWARFDataExtractor.h"
#include "llvm/DebugInfo/DWARF/DWARFRelocMap.h"
-#include "llvm/Support/DataExtractor.h"
#include <cstdint>
#include <utility>
@@ -41,20 +41,31 @@ class DWARFAcceleratorTable {
struct Header Hdr;
struct HeaderData HdrData;
- DataExtractor AccelSection;
+ DWARFDataExtractor AccelSection;
DataExtractor StringSection;
- const RelocAddrMap& Relocs;
public:
- DWARFAcceleratorTable(DataExtractor AccelSection, DataExtractor StringSection,
- const RelocAddrMap &Relocs)
- : AccelSection(AccelSection), StringSection(StringSection), Relocs(Relocs) {}
+ DWARFAcceleratorTable(const DWARFDataExtractor &AccelSection,
+ DataExtractor StringSection)
+ : AccelSection(AccelSection), StringSection(StringSection) {}
bool extract();
uint32_t getNumBuckets();
uint32_t getNumHashes();
uint32_t getSizeHdr();
uint32_t getHeaderDataLength();
+ ArrayRef<std::pair<HeaderData::AtomType, HeaderData::Form>> getAtomsDesc();
+ bool validateForms();
+
+ /// Return information related to the DWARF DIE we're looking for when
+ /// performing a lookup by name.
+ ///
+ /// \param HashDataOffset an offset into the hash data table
+ /// \returns DIEOffset the offset into the .debug_info section for the DIE
+ /// related to the input hash data offset. Currently this function returns
+ /// only the DIEOffset but it can be modified to return more data regarding
+ /// the DIE
+ uint32_t readAtoms(uint32_t &HashDataOffset);
void dump(raw_ostream &OS) const;
};