]> granicus.if.org Git - llvm/commitdiff
[DebugInfo]Print correct value for special opcode address increment
authorJames Henderson <jh7370@my.bristol.ac.uk>
Wed, 6 Feb 2019 10:31:50 +0000 (10:31 +0000)
committerJames Henderson <jh7370@my.bristol.ac.uk>
Wed, 6 Feb 2019 10:31:50 +0000 (10:31 +0000)
The wrong variable was being used when printing the address increment in
verbose output of .debug_line. This patch fixes this.

Reviewed by: JDevlieghere

Differential Revision: https://reviews.llvm.org/D57693

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353288 91177308-0d34-0410-b5e6-96231b3b80d8

lib/DebugInfo/DWARF/DWARFDebugLine.cpp
test/tools/llvm-dwarfdump/X86/verbose.test

index 57a8a2cac4ede42aeb4988cbac9789589cfffdf9..ac9b2e0d28fd6e7e00c5d99253fc68906019412e 100644 (file)
@@ -817,8 +817,8 @@ Error DWARFDebugLine::LineTable::parse(
       State.Row.Address += AddrOffset;
 
       if (OS) {
-        *OS << "address += " << ((uint32_t)AdjustOpcode)
-            << ",  line += " << LineOffset << "\n";
+        *OS << "address += " << AddrOffset << ",  line += " << LineOffset
+            << "\n";
         OS->indent(12);
         State.Row.dump(*OS);
       }
index 2d52247f15f2da96fcba2040d624cdac40edbc9f..a05edb9a2ae13d1530d20ca6b0ac5e8d7b998f1e 100644 (file)
@@ -16,7 +16,7 @@
 # CHECK: 0x0000000000000000      1      0      1   0             0  is_stmt
 # CHECK: 05 DW_LNS_set_column (12)
 # CHECK: 0a DW_LNS_set_prologue_end
-# CHECK: 66 address += 89,  line += 0
+# CHECK: 66 address += 6,  line += 0
 # CHECK: 0x0000000000000006      1     12      1   0             0  is_stmt prologue_end
 # CHECK: 02 DW_LNS_advance_pc (2)
 # CHECK: 00 DW_LNE_end_sequence