[llvm] r286603 - Fixed issues found by Paul Robinson with my patch for:
Greg Clayton via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 11 09:38:15 PST 2016
Author: gclayton
Date: Fri Nov 11 11:38:14 2016
New Revision: 286603
URL: http://llvm.org/viewvc/llvm-project?rev=286603&view=rev
Log:
Fixed issues found by Paul Robinson with my patch for:
https://reviews.llvm.org/D26526
- Fixed DW_FORM_strp to be correctly sized and extracted for DWARF64
- Added some missing strp variants as well
- Fixed comment typo
Modified:
llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp
Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp?rev=286603&r1=286602&r2=286603&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp Fri Nov 11 11:38:14 2016
@@ -128,9 +128,9 @@ static Optional<uint8_t> getFixedByteSiz
case DW_FORM_data4:
case DW_FORM_ref4:
- case DW_FORM_strp:
return 4;
+ case DW_FORM_strp:
case DW_FORM_GNU_ref_alt:
case DW_FORM_GNU_strp_alt:
case DW_FORM_line_strp:
@@ -169,7 +169,7 @@ static bool skipFormValue(dwarf::Form Fo
bool Indirect = false;
do {
switch (Form) {
- // Blocks if inlined data that have a length field and the data bytes
+ // Blocks of inlined data that have a length field and the data bytes
// inlined in the .debug_info.
case DW_FORM_exprloc:
case DW_FORM_block: {
@@ -211,8 +211,11 @@ static bool skipFormValue(dwarf::Form Fo
case DW_FORM_ref4:
case DW_FORM_ref8:
case DW_FORM_ref_sig8:
+ case DW_FORM_ref_sup:
case DW_FORM_sec_offset:
case DW_FORM_strp:
+ case DW_FORM_strp_sup:
+ case DW_FORM_line_strp:
case DW_FORM_GNU_ref_alt:
case DW_FORM_GNU_strp_alt:
if (Optional<uint8_t> FixedSize = ::getFixedByteSize(Form, U)) {
@@ -341,8 +344,7 @@ bool DWARFFormValue::extractValue(const
Value.uval = data.getU16(offset_ptr);
break;
case DW_FORM_data4:
- case DW_FORM_ref4:
- case DW_FORM_strp: {
+ case DW_FORM_ref4: {
Value.uval = data.getU32(offset_ptr);
if (!U)
break;
@@ -369,6 +371,7 @@ bool DWARFFormValue::extractValue(const
Form = static_cast<dwarf::Form>(data.getULEB128(offset_ptr));
indirect = true;
break;
+ case DW_FORM_strp:
case DW_FORM_sec_offset:
case DW_FORM_GNU_ref_alt:
case DW_FORM_GNU_strp_alt:
More information about the llvm-commits
mailing list