mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-12 17:37:13 +00:00
The class used for the dump only allows to dump for the moment, but it can (and will) be easily extended to support search also. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221836 91177308-0d34-0410-b5e6-96231b3b80d8
39 lines
792 B
C++
39 lines
792 B
C++
|
|
#include "llvm/ADT/SmallVector.h"
|
|
#include "llvm/DebugInfo/DWARFFormValue.h"
|
|
|
|
#include <cstdint>
|
|
|
|
namespace llvm {
|
|
|
|
class DWARFAcceleratorTable {
|
|
|
|
struct Header {
|
|
uint32_t Magic;
|
|
uint16_t Version;
|
|
uint16_t HashFunction;
|
|
uint32_t NumBuckets;
|
|
uint32_t NumHashes;
|
|
uint32_t HeaderDataLength;
|
|
};
|
|
|
|
struct HeaderData {
|
|
typedef uint16_t AtomType;
|
|
uint32_t DIEOffsetBase;
|
|
SmallVector<std::pair<AtomType, DWARFFormValue>, 1> Atoms;
|
|
};
|
|
|
|
struct Header Hdr;
|
|
struct HeaderData HdrData;
|
|
DataExtractor AccelSection;
|
|
DataExtractor StringSection;
|
|
public:
|
|
DWARFAcceleratorTable(DataExtractor AccelSection, DataExtractor StringSection)
|
|
: AccelSection(AccelSection), StringSection(StringSection) {}
|
|
|
|
bool extract();
|
|
void dump(raw_ostream &OS);
|
|
};
|
|
|
|
}
|