summaryrefslogtreecommitdiff
path: root/lib/DebugInfo
diff options
context:
space:
mode:
authorPaul Robinson <paul.robinson@sony.com>2017-12-15 23:21:52 +0000
committerPaul Robinson <paul.robinson@sony.com>2017-12-15 23:21:52 +0000
commit87764e1e353cc989053bcb50289a312194f2739f (patch)
tree29e468c268d37a6e76477721e7f7b53257f66513 /lib/DebugInfo
parent6b36b462738519662ccef8748db8cf7f17ed4911 (diff)
Revert "Recommit "[DWARFv5] Dump an MD5 checksum in the line-table header.""
This reverts commit 0afef672f63f0e4e91938656bc73424a8c058bfc. Still failing at runtime on bots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320888 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/DebugInfo')
-rw-r--r--lib/DebugInfo/DWARF/DWARFDebugLine.cpp41
-rw-r--r--lib/DebugInfo/DWARF/DWARFFormValue.cpp12
2 files changed, 14 insertions, 39 deletions
diff --git a/lib/DebugInfo/DWARF/DWARFDebugLine.cpp b/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
index e5ef4eaceeb..5376b465a49 100644
--- a/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
+++ b/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
@@ -48,7 +48,6 @@ void DWARFDebugLine::Prologue::clear() {
MinInstLength = MaxOpsPerInst = DefaultIsStmt = LineBase = LineRange = 0;
OpcodeBase = 0;
FormParams = DWARFFormParams({0, 0, DWARF32});
- HasMD5 = false;
StandardOpcodeLengths.clear();
IncludeDirectories.clear();
FileNames.clear();
@@ -79,23 +78,15 @@ void DWARFDebugLine::Prologue::dump(raw_ostream &OS) const {
<< IncludeDirectories[I] << "'\n";
if (!FileNames.empty()) {
- if (HasMD5)
- OS << " Dir MD5 Checksum File Name\n"
- << " ---- -------------------------------- -----------"
- "---------------\n";
- else
- OS << " Dir Mod Time File Len File Name\n"
- << " ---- ---------- ---------- -----------"
- "----------------\n";
+ OS << " Dir Mod Time File Len File Name\n"
+ << " ---- ---------- ---------- -----------"
+ "----------------\n";
for (uint32_t I = 0; I != FileNames.size(); ++I) {
const FileNameEntry &FileEntry = FileNames[I];
- OS << format("file_names[%3u] %4" PRIu64 " ", I + 1, FileEntry.DirIdx);
- if (HasMD5)
- OS << FileEntry.Checksum.digest();
- else
- OS << format("0x%8.8" PRIx64 " 0x%8.8" PRIx64, FileEntry.ModTime,
- FileEntry.Length);
- OS << ' ' << FileEntry.Name << '\n';
+ OS << format("file_names[%3u] %4" PRIu64 " ", I + 1, FileEntry.DirIdx)
+ << format("0x%8.8" PRIx64 " 0x%8.8" PRIx64 " ", FileEntry.ModTime,
+ FileEntry.Length)
+ << FileEntry.Name << '\n';
}
}
}
@@ -131,7 +122,7 @@ parseV2DirFileTables(const DWARFDataExtractor &DebugLineData,
// ran off the end of the prologue.
static ContentDescriptors
parseV5EntryFormat(const DWARFDataExtractor &DebugLineData, uint32_t *OffsetPtr,
- uint64_t EndPrologueOffset, bool *HasMD5) {
+ uint64_t EndPrologueOffset) {
ContentDescriptors Descriptors;
int FormatCount = DebugLineData.getU8(OffsetPtr);
bool HasPath = false;
@@ -144,8 +135,6 @@ parseV5EntryFormat(const DWARFDataExtractor &DebugLineData, uint32_t *OffsetPtr,
Descriptor.Form = dwarf::Form(DebugLineData.getULEB128(OffsetPtr));
if (Descriptor.Type == dwarf::DW_LNCT_path)
HasPath = true;
- else if (Descriptor.Type == dwarf::DW_LNCT_MD5 && HasMD5)
- *HasMD5 = true;
Descriptors.push_back(Descriptor);
}
return HasPath ? Descriptors : ContentDescriptors();
@@ -155,11 +144,11 @@ static bool
parseV5DirFileTables(const DWARFDataExtractor &DebugLineData,
uint32_t *OffsetPtr, uint64_t EndPrologueOffset,
const DWARFFormParams &FormParams, const DWARFUnit *U,
- bool &HasMD5, std::vector<StringRef> &IncludeDirectories,
+ std::vector<StringRef> &IncludeDirectories,
std::vector<DWARFDebugLine::FileNameEntry> &FileNames) {
// Get the directory entry description.
ContentDescriptors DirDescriptors =
- parseV5EntryFormat(DebugLineData, OffsetPtr, EndPrologueOffset, nullptr);
+ parseV5EntryFormat(DebugLineData, OffsetPtr, EndPrologueOffset);
if (DirDescriptors.empty())
return false;
@@ -185,7 +174,7 @@ parseV5DirFileTables(const DWARFDataExtractor &DebugLineData,
// Get the file entry description.
ContentDescriptors FileDescriptors =
- parseV5EntryFormat(DebugLineData, OffsetPtr, EndPrologueOffset, &HasMD5);
+ parseV5EntryFormat(DebugLineData, OffsetPtr, EndPrologueOffset);
if (FileDescriptors.empty())
return false;
@@ -212,11 +201,7 @@ parseV5DirFileTables(const DWARFDataExtractor &DebugLineData,
case DW_LNCT_size:
FileEntry.Length = Value.getAsUnsignedConstant().getValue();
break;
- case DW_LNCT_MD5:
- assert(Value.getAsBlock().getValue().size() == 16);
- std::uninitialized_copy_n(Value.getAsBlock().getValue().begin(), 16,
- FileEntry.Checksum.Bytes.begin());
- break;
+ // FIXME: Add MD5
default:
break;
}
@@ -268,7 +253,7 @@ bool DWARFDebugLine::Prologue::parse(const DWARFDataExtractor &DebugLineData,
if (getVersion() >= 5) {
if (!parseV5DirFileTables(DebugLineData, OffsetPtr, EndPrologueOffset,
- getFormParams(), U, HasMD5, IncludeDirectories,
+ getFormParams(), U, IncludeDirectories,
FileNames)) {
fprintf(stderr,
"warning: parsing line table prologue at 0x%8.8" PRIx64
diff --git a/lib/DebugInfo/DWARF/DWARFFormValue.cpp b/lib/DebugInfo/DWARF/DWARFFormValue.cpp
index 44886de2e3d..14e2fe3eeb5 100644
--- a/lib/DebugInfo/DWARF/DWARFFormValue.cpp
+++ b/lib/DebugInfo/DWARF/DWARFFormValue.cpp
@@ -186,7 +186,6 @@ bool DWARFFormValue::skipValue(dwarf::Form Form, DataExtractor DebugInfoData,
case DW_FORM_data2:
case DW_FORM_data4:
case DW_FORM_data8:
- case DW_FORM_data16:
case DW_FORM_flag:
case DW_FORM_ref1:
case DW_FORM_ref2:
@@ -340,11 +339,6 @@ bool DWARFFormValue::extractValue(const DWARFDataExtractor &Data,
case DW_FORM_ref_sup8:
Value.uval = Data.getU64(OffsetPtr);
break;
- case DW_FORM_data16:
- // Treat this like a 16-byte block.
- Value.uval = 16;
- IsBlock = true;
- break;
case DW_FORM_sdata:
Value.sval = Data.getSLEB128(OffsetPtr);
break;
@@ -438,9 +432,6 @@ void DWARFFormValue::dump(raw_ostream &OS, DIDumpOptions DumpOpts) const {
case DW_FORM_data8:
OS << format("0x%016" PRIx64, UValue);
break;
- case DW_FORM_data16:
- OS << format_bytes(ArrayRef<uint8_t>(Value.data, 16), None, 16, 16);
- break;
case DW_FORM_string:
OS << '"';
OS.write_escaped(Value.cstr);
@@ -660,8 +651,7 @@ Optional<int64_t> DWARFFormValue::getAsSignedConstant() const {
}
Optional<ArrayRef<uint8_t>> DWARFFormValue::getAsBlock() const {
- if (!isFormClass(FC_Block) && !isFormClass(FC_Exprloc) &&
- Form != DW_FORM_data16)
+ if (!isFormClass(FC_Block) && !isFormClass(FC_Exprloc))
return None;
return makeArrayRef(Value.data, Value.uval);
}