[llvm] r217232 - [dwarfdump] Dump DW_AT_(decl|call)_line attribute values as decimal values.
Frederic Riss
friss at apple.com
Fri Sep 5 00:21:50 PDT 2014
Author: friss
Date: Fri Sep 5 02:21:50 2014
New Revision: 217232
URL: http://llvm.org/viewvc/llvm-project?rev=217232&view=rev
Log:
[dwarfdump] Dump DW_AT_(decl|call)_line attribute values as decimal values.
Modified:
llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp
llvm/trunk/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll
llvm/trunk/test/DebugInfo/X86/fission-cu.ll
llvm/trunk/test/DebugInfo/namespace.ll
llvm/trunk/test/MC/MachO/gen-dwarf.s
Modified: llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp?rev=217232&r1=217231&r2=217232&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp Fri Sep 5 02:21:50 2014
@@ -93,6 +93,8 @@ void DWARFDebugInfoEntryMinimal::dumpAtt
if (Name) {
OS << Name;
+ } else if (attr == DW_AT_decl_line || attr == DW_AT_call_line) {
+ OS << *formValue.getAsUnsignedConstant();
} else {
formValue.dump(OS, u);
}
Modified: llvm/trunk/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll?rev=217232&r1=217231&r2=217232&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll Fri Sep 5 02:21:50 2014
@@ -42,7 +42,7 @@ declare void @llvm.dbg.declare(metadata,
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_decl_file [DW_FORM_data1] (0x01)
; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_decl_line [DW_FORM_data1] (0x01)
+; CHECK: DW_AT_decl_line [DW_FORM_data1] (1)
; CHECK: DW_TAG_variable
; CHECK-NOT: DW_TAG
@@ -50,6 +50,6 @@ declare void @llvm.dbg.declare(metadata,
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_decl_file [DW_FORM_data1] (0x01)
; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_decl_line [DW_FORM_data1] (0x04)
+; CHECK: DW_AT_decl_line [DW_FORM_data1] (4)
!21 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}
Modified: llvm/trunk/test/DebugInfo/X86/fission-cu.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/fission-cu.ll?rev=217232&r1=217231&r2=217232&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/fission-cu.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/fission-cu.ll Fri Sep 5 02:21:50 2014
@@ -76,7 +76,7 @@
; CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[TYPE:0x[0-9a-f]*]]})
; CHECK: DW_AT_external [DW_FORM_flag_present] (true)
; CHECK: DW_AT_decl_file [DW_FORM_data1] (0x01)
-; CHECK: DW_AT_decl_line [DW_FORM_data1] (0x01)
+; CHECK: DW_AT_decl_line [DW_FORM_data1] (1)
; CHECK: DW_AT_location [DW_FORM_exprloc] (<0x2> fb 00 )
; CHECK: [[TYPE]]: DW_TAG_base_type
; CHECK: DW_AT_name [DW_FORM_GNU_str_index] ( indexed (00000003) string = "int")
Modified: llvm/trunk/test/DebugInfo/namespace.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/namespace.ll?rev=217232&r1=217231&r2=217232&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/namespace.ll (original)
+++ llvm/trunk/test/DebugInfo/namespace.ll Fri Sep 5 02:21:50 2014
@@ -6,12 +6,12 @@
; CHECK: [[NS1:0x[0-9a-f]*]]:{{ *}}DW_TAG_namespace
; CHECK-NEXT: DW_AT_name{{.*}} = "A"
; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F1:[0-9]]])
-; CHECK-NEXT: DW_AT_decl_line{{.*}}(0x03)
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(3)
; CHECK-NOT: NULL
; CHECK: [[NS2:0x[0-9a-f]*]]:{{ *}}DW_TAG_namespace
; CHECK-NEXT: DW_AT_name{{.*}} = "B"
; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F2:[0-9]]])
-; CHECK-NEXT: DW_AT_decl_line{{.*}}(0x01)
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(1)
; CHECK-NOT: NULL
; CHECK: [[I:0x[0-9a-f]*]]:{{ *}}DW_TAG_variable
; CHECK-NEXT: DW_AT_name{{.*}}= "i"
@@ -40,7 +40,7 @@
; This is a bug, it should be in F2 but it inherits the file from its
; enclosing scope
; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F1]])
-; CHECK-NEXT: DW_AT_decl_line{{.*}}(0x08)
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(8)
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS2]]})
; CHECK: NULL
; CHECK-NOT: NULL
@@ -48,7 +48,7 @@
; CHECK: DW_TAG_imported_module
; Same bug as above, this should be F2, not F1
; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F1]])
-; CHECK-NEXT: DW_AT_decl_line{{.*}}(0x0b)
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(11)
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS1]]})
; CHECK-NOT: NULL
@@ -60,38 +60,38 @@
; CHECK-NOT: NULL
; CHECK: DW_TAG_imported_module
; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F2]])
-; CHECK-NEXT: DW_AT_decl_line{{.*}}(0x12)
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(18)
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS1]]})
; CHECK-NOT: NULL
; CHECK: DW_TAG_imported_declaration
; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F2]])
-; CHECK-NEXT: DW_AT_decl_line{{.*}}(0x13)
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(19)
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[FOO]]})
; CHECK-NOT: NULL
; CHECK: DW_TAG_imported_declaration
; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F2]])
-; CHECK-NEXT: DW_AT_decl_line{{.*}}(0x14)
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(20)
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[BAR]]})
; CHECK-NOT: NULL
; CHECK: DW_TAG_imported_declaration
; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F2]])
-; CHECK-NEXT: DW_AT_decl_line{{.*}}(0x15)
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(21)
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[FUNC1]]})
; CHECK-NOT: NULL
; CHECK: DW_TAG_imported_declaration
; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F2]])
-; CHECK-NEXT: DW_AT_decl_line{{.*}}(0x16)
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(22)
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[I]]})
; CHECK-NOT: NULL
; CHECK: [[X:0x[0-9a-f]*]]:{{ *}}DW_TAG_imported_declaration
; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F2]])
-; CHECK-NEXT: DW_AT_decl_line{{.*}}(0x18)
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(24)
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS1]]})
; CHECK-NEXT: DW_AT_name{{.*}}"X"
; CHECK-NOT: NULL
; CHECK: DW_TAG_imported_declaration
; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F2]])
-; CHECK-NEXT: DW_AT_decl_line{{.*}}(0x19)
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(25)
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[X]]})
; CHECK-NEXT: DW_AT_name{{.*}}"Y"
; CHECK-NOT: NULL
@@ -99,7 +99,7 @@
; CHECK-NOT: NULL
; CHECK: DW_TAG_imported_module
; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F2]])
-; CHECK-NEXT: DW_AT_decl_line{{.*}}(0x0f)
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(15)
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[NS2]]})
; CHECK: NULL
; CHECK: NULL
Modified: llvm/trunk/test/MC/MachO/gen-dwarf.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/gen-dwarf.s?rev=217232&r1=217231&r2=217232&view=diff
==============================================================================
--- llvm/trunk/test/MC/MachO/gen-dwarf.s (original)
+++ llvm/trunk/test/MC/MachO/gen-dwarf.s Fri Sep 5 02:21:50 2014
@@ -51,7 +51,7 @@ _x: .long 1
// CHECK: DW_TAG_label [2] *
// CHECK: DW_AT_name [DW_FORM_string] ("bar")
// CHECK: DW_AT_decl_file [DW_FORM_data4] (0x00000001)
-// CHECK: DW_AT_decl_line [DW_FORM_data4] (0x00000005)
+// CHECK: DW_AT_decl_line [DW_FORM_data4] (5)
// CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
// CHECK: DW_AT_prototyped [DW_FORM_flag] (0x00)
@@ -62,7 +62,7 @@ _x: .long 1
// CHECK: DW_TAG_label [2] *
// CHECK: DW_AT_name [DW_FORM_string] ("foo")
// CHECK: DW_AT_decl_file [DW_FORM_data4] (0x00000001)
-// CHECK: DW_AT_decl_line [DW_FORM_data4] (0x00000009)
+// CHECK: DW_AT_decl_line [DW_FORM_data4] (9)
// CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000007)
// CHECK: DW_AT_prototyped [DW_FORM_flag] (0x00)
@@ -73,7 +73,7 @@ _x: .long 1
// CHECK: DW_TAG_label [2] *
// CHECK: DW_AT_name [DW_FORM_string] ("baz")
// CHECK: DW_AT_decl_file [DW_FORM_data4] (0x00000001)
-// CHECK: DW_AT_decl_line [DW_FORM_data4] (0x0000000a)
+// CHECK: DW_AT_decl_line [DW_FORM_data4] (10)
// CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000007)
// CHECK: DW_AT_prototyped [DW_FORM_flag] (0x00)
More information about the llvm-commits
mailing list