1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[dwarfdump] Dump DW_AT_(decl|call)_line attribute values as decimal values.

llvm-svn: 217232
This commit is contained in:
Frederic Riss 2014-09-05 07:21:50 +00:00
parent 7f2a6aeb9c
commit d3d3c64d38
5 changed files with 20 additions and 18 deletions

View File

@ -93,6 +93,8 @@ void DWARFDebugInfoEntryMinimal::dumpAttribute(raw_ostream &OS,
if (Name) { if (Name) {
OS << Name; OS << Name;
} else if (attr == DW_AT_decl_line || attr == DW_AT_call_line) {
OS << *formValue.getAsUnsignedConstant();
} else { } else {
formValue.dump(OS, u); formValue.dump(OS, u);
} }

View File

@ -42,7 +42,7 @@ declare void @llvm.dbg.declare(metadata, metadata) nounwind readnone
; CHECK-NOT: DW_TAG ; CHECK-NOT: DW_TAG
; CHECK: DW_AT_decl_file [DW_FORM_data1] (0x01) ; CHECK: DW_AT_decl_file [DW_FORM_data1] (0x01)
; CHECK-NOT: DW_TAG ; 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: DW_TAG_variable
; CHECK-NOT: DW_TAG ; CHECK-NOT: DW_TAG
@ -50,6 +50,6 @@ declare void @llvm.dbg.declare(metadata, metadata) nounwind readnone
; CHECK-NOT: DW_TAG ; CHECK-NOT: DW_TAG
; CHECK: DW_AT_decl_file [DW_FORM_data1] (0x01) ; CHECK: DW_AT_decl_file [DW_FORM_data1] (0x01)
; CHECK-NOT: DW_TAG ; 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} !21 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}

View File

@ -76,7 +76,7 @@
; CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[TYPE:0x[0-9a-f]*]]}) ; 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_external [DW_FORM_flag_present] (true)
; CHECK: DW_AT_decl_file [DW_FORM_data1] (0x01) ; 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: DW_AT_location [DW_FORM_exprloc] (<0x2> fb 00 )
; CHECK: [[TYPE]]: DW_TAG_base_type ; CHECK: [[TYPE]]: DW_TAG_base_type
; CHECK: DW_AT_name [DW_FORM_GNU_str_index] ( indexed (00000003) string = "int") ; CHECK: DW_AT_name [DW_FORM_GNU_str_index] ( indexed (00000003) string = "int")

View File

@ -6,12 +6,12 @@
; CHECK: [[NS1:0x[0-9a-f]*]]:{{ *}}DW_TAG_namespace ; CHECK: [[NS1:0x[0-9a-f]*]]:{{ *}}DW_TAG_namespace
; CHECK-NEXT: DW_AT_name{{.*}} = "A" ; CHECK-NEXT: DW_AT_name{{.*}} = "A"
; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F1:[0-9]]]) ; 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-NOT: NULL
; CHECK: [[NS2:0x[0-9a-f]*]]:{{ *}}DW_TAG_namespace ; CHECK: [[NS2:0x[0-9a-f]*]]:{{ *}}DW_TAG_namespace
; CHECK-NEXT: DW_AT_name{{.*}} = "B" ; CHECK-NEXT: DW_AT_name{{.*}} = "B"
; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F2:[0-9]]]) ; 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-NOT: NULL
; CHECK: [[I:0x[0-9a-f]*]]:{{ *}}DW_TAG_variable ; CHECK: [[I:0x[0-9a-f]*]]:{{ *}}DW_TAG_variable
; CHECK-NEXT: DW_AT_name{{.*}}= "i" ; 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 ; This is a bug, it should be in F2 but it inherits the file from its
; enclosing scope ; enclosing scope
; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F1]]) ; 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-NEXT: DW_AT_import{{.*}}=> {[[NS2]]})
; CHECK: NULL ; CHECK: NULL
; CHECK-NOT: NULL ; CHECK-NOT: NULL
@ -48,7 +48,7 @@
; CHECK: DW_TAG_imported_module ; CHECK: DW_TAG_imported_module
; Same bug as above, this should be F2, not F1 ; Same bug as above, this should be F2, not F1
; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[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-NEXT: DW_AT_import{{.*}}=> {[[NS1]]})
; CHECK-NOT: NULL ; CHECK-NOT: NULL
@ -60,38 +60,38 @@
; CHECK-NOT: NULL ; CHECK-NOT: NULL
; CHECK: DW_TAG_imported_module ; CHECK: DW_TAG_imported_module
; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F2]]) ; 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-NEXT: DW_AT_import{{.*}}=> {[[NS1]]})
; CHECK-NOT: NULL ; CHECK-NOT: NULL
; CHECK: DW_TAG_imported_declaration ; CHECK: DW_TAG_imported_declaration
; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F2]]) ; 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-NEXT: DW_AT_import{{.*}}=> {[[FOO]]})
; CHECK-NOT: NULL ; CHECK-NOT: NULL
; CHECK: DW_TAG_imported_declaration ; CHECK: DW_TAG_imported_declaration
; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F2]]) ; 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-NEXT: DW_AT_import{{.*}}=> {[[BAR]]})
; CHECK-NOT: NULL ; CHECK-NOT: NULL
; CHECK: DW_TAG_imported_declaration ; CHECK: DW_TAG_imported_declaration
; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F2]]) ; 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-NEXT: DW_AT_import{{.*}}=> {[[FUNC1]]})
; CHECK-NOT: NULL ; CHECK-NOT: NULL
; CHECK: DW_TAG_imported_declaration ; CHECK: DW_TAG_imported_declaration
; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F2]]) ; 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-NEXT: DW_AT_import{{.*}}=> {[[I]]})
; CHECK-NOT: NULL ; CHECK-NOT: NULL
; CHECK: [[X:0x[0-9a-f]*]]:{{ *}}DW_TAG_imported_declaration ; CHECK: [[X:0x[0-9a-f]*]]:{{ *}}DW_TAG_imported_declaration
; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F2]]) ; 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_import{{.*}}=> {[[NS1]]})
; CHECK-NEXT: DW_AT_name{{.*}}"X" ; CHECK-NEXT: DW_AT_name{{.*}}"X"
; CHECK-NOT: NULL ; CHECK-NOT: NULL
; CHECK: DW_TAG_imported_declaration ; CHECK: DW_TAG_imported_declaration
; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F2]]) ; 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_import{{.*}}=> {[[X]]})
; CHECK-NEXT: DW_AT_name{{.*}}"Y" ; CHECK-NEXT: DW_AT_name{{.*}}"Y"
; CHECK-NOT: NULL ; CHECK-NOT: NULL
@ -99,7 +99,7 @@
; CHECK-NOT: NULL ; CHECK-NOT: NULL
; CHECK: DW_TAG_imported_module ; CHECK: DW_TAG_imported_module
; CHECK-NEXT: DW_AT_decl_file{{.*}}(0x0[[F2]]) ; 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-NEXT: DW_AT_import{{.*}}=> {[[NS2]]})
; CHECK: NULL ; CHECK: NULL
; CHECK: NULL ; CHECK: NULL

View File

@ -51,7 +51,7 @@ _x: .long 1
// CHECK: DW_TAG_label [2] * // CHECK: DW_TAG_label [2] *
// CHECK: DW_AT_name [DW_FORM_string] ("bar") // CHECK: DW_AT_name [DW_FORM_string] ("bar")
// CHECK: DW_AT_decl_file [DW_FORM_data4] (0x00000001) // 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_low_pc [DW_FORM_addr] (0x0000000000000000)
// CHECK: DW_AT_prototyped [DW_FORM_flag] (0x00) // CHECK: DW_AT_prototyped [DW_FORM_flag] (0x00)
@ -62,7 +62,7 @@ _x: .long 1
// CHECK: DW_TAG_label [2] * // CHECK: DW_TAG_label [2] *
// CHECK: DW_AT_name [DW_FORM_string] ("foo") // CHECK: DW_AT_name [DW_FORM_string] ("foo")
// CHECK: DW_AT_decl_file [DW_FORM_data4] (0x00000001) // 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_low_pc [DW_FORM_addr] (0x0000000000000007)
// CHECK: DW_AT_prototyped [DW_FORM_flag] (0x00) // CHECK: DW_AT_prototyped [DW_FORM_flag] (0x00)
@ -73,7 +73,7 @@ _x: .long 1
// CHECK: DW_TAG_label [2] * // CHECK: DW_TAG_label [2] *
// CHECK: DW_AT_name [DW_FORM_string] ("baz") // CHECK: DW_AT_name [DW_FORM_string] ("baz")
// CHECK: DW_AT_decl_file [DW_FORM_data4] (0x00000001) // 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_low_pc [DW_FORM_addr] (0x0000000000000007)
// CHECK: DW_AT_prototyped [DW_FORM_flag] (0x00) // CHECK: DW_AT_prototyped [DW_FORM_flag] (0x00)