DebugInfo: .debug_line DWARF64 support

This adds support for the 64-bit DWARF format, but is still limited to
less than 4GB of debug data by the DataExtractor class.  Some versions
of the GNU MIPS toolchain generate 64-Bit DWARF even though it isn't
actually necessary.

Differential Revision: http://reviews.llvm.org/D1988


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238434 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ed Maste
2015-05-28 15:38:17 +00:00
parent c4e38f605e
commit 5d25204af9
4 changed files with 46 additions and 14 deletions

View File

@@ -38,12 +38,12 @@ public:
// The size in bytes of the statement information for this compilation unit
// (not including the total_length field itself).
uint32_t TotalLength;
uint64_t TotalLength;
// Version identifier for the statement information format.
uint16_t Version;
// The number of bytes following the prologue_length field to the beginning
// of the first byte of the statement program itself.
uint32_t PrologueLength;
uint64_t PrologueLength;
// The size in bytes of the smallest target machine instruction. Statement
// program opcodes that alter the address register first multiply their
// operands by this value.
@@ -63,14 +63,22 @@ public:
std::vector<const char*> IncludeDirectories;
std::vector<FileNameEntry> FileNames;
bool IsDWARF64;
uint32_t sizeofTotalLength() const {
return IsDWARF64 ? 12 : 4;
}
uint32_t sizeofPrologueLength() const {
return IsDWARF64 ? 8 : 4;
}
// Length of the prologue in bytes.
uint32_t getLength() const {
return PrologueLength + sizeof(TotalLength) + sizeof(Version) +
sizeof(PrologueLength);
return PrologueLength + sizeofTotalLength() + sizeof(Version) +
sizeofPrologueLength();
}
// Length of the line table data in bytes (not including the prologue).
uint32_t getStatementTableLength() const {
return TotalLength + sizeof(TotalLength) - getLength();
return TotalLength + sizeofTotalLength() - getLength();
}
int32_t getMaxLineIncrementForSpecialOpcode() const {
return LineBase + (int8_t)LineRange - 1;