[llvm] r254626 - dwarfdump: Correctly indentify the indicies for DWP records

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 3 10:41:59 PST 2015


Author: dblaikie
Date: Thu Dec  3 12:41:59 2015
New Revision: 254626

URL: http://llvm.org/viewvc/llvm-project?rev=254626&view=rev
Log:
dwarfdump: Correctly indentify the indicies for DWP records

The indicies are one-based, not zero-based, per the spec.

Modified:
    llvm/trunk/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp
    llvm/trunk/test/DebugInfo/dwarfdump-dwp.test

Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp?rev=254626&r1=254625&r2=254626&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp Thu Dec  3 12:41:59 2015
@@ -133,7 +133,7 @@ void DWARFUnitIndex::dump(raw_ostream &O
   for (unsigned i = 0; i != Header.NumBuckets; ++i) {
     auto &Row = Rows[i];
     if (auto *Contribs = Row.Contributions.get()) {
-      OS << format("%5u 0x%016" PRIx64 " ", i, Row.Signature);
+      OS << format("%5u 0x%016" PRIx64 " ", i + 1, Row.Signature);
       for (unsigned i = 0; i != Header.NumColumns; ++i) {
         auto &Contrib = Contribs[i];
         OS << format("[0x%08x, 0x%08x) ", Contrib.Offset,

Modified: llvm/trunk/test/DebugInfo/dwarfdump-dwp.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/dwarfdump-dwp.test?rev=254626&r1=254625&r2=254626&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/dwarfdump-dwp.test (original)
+++ llvm/trunk/test/DebugInfo/dwarfdump-dwp.test Thu Dec  3 12:41:59 2015
@@ -39,15 +39,15 @@ RUN: llvm-dwarfdump %p/Inputs/dwarfdump-
 ; CHECK-NEXT: version = 2 slots = 16
 ; CHECK:      Index Signature          INFO                     ABBREV                   LINE                     STR_OFFSETS
 ; CHECK-NEXT: ----- ------------------ ------------------------ ------------------------ ------------------------ ------------------------
-; CHECK-NEXT:     2 0xfef104c25502f092 [0x0000002d, 0x0000005f) [0x00000043, 0x0000008e) [0x0000001a, 0x00000034) [0x00000010, 0x00000024)
-; CHECK-NEXT:     8 0x03c30756e2d45008 [0x00000000, 0x0000002d) [0x00000000, 0x00000043) [0x00000000, 0x0000001a) [0x00000000, 0x00000010)
+; CHECK-NEXT:     3 0xfef104c25502f092 [0x0000002d, 0x0000005f) [0x00000043, 0x0000008e) [0x0000001a, 0x00000034) [0x00000010, 0x00000024)
+; CHECK-NEXT:     9 0x03c30756e2d45008 [0x00000000, 0x0000002d) [0x00000000, 0x00000043) [0x00000000, 0x0000001a) [0x00000000, 0x00000010)
 
 ; CHECK: .debug_tu_index contents:
 ; CHECK-NEXT: version = 2 slots = 16
 ; CHECK:      Index Signature          TYPES                    ABBREV                   LINE                     STR_OFFSETS
 ; CHECK-NEXT: ----- ------------------ ------------------------ ------------------------ ------------------------ ------------------------
-; CHECK-NEXT:     8 0x1d02f3be30cc5688 [0x00000024, 0x00000048) [0x00000043, 0x0000008e) [0x0000001a, 0x00000034) [0x00000010, 0x00000024)
-; CHECK-NEXT:    12 0x3875c0e21cda63fc [0x00000000, 0x00000024) [0x00000000, 0x00000043) [0x00000000, 0x0000001a) [0x00000000, 0x00000010)
+; CHECK-NEXT:     9 0x1d02f3be30cc5688 [0x00000024, 0x00000048) [0x00000043, 0x0000008e) [0x0000001a, 0x00000034) [0x00000010, 0x00000024)
+; CHECK-NEXT:    13 0x3875c0e21cda63fc [0x00000000, 0x00000024) [0x00000000, 0x00000043) [0x00000000, 0x0000001a) [0x00000000, 0x00000010)
 
 ; TODO: use the index section offset info to correctly dump strings in debug info
 ; TODO: use the index section offset info to correctly dump file names in debug info




More information about the llvm-commits mailing list