1*9880d681SAndroid Build Coastguard WorkerRUN: llvm-dwp %p/../Inputs/simple/notypes/a.dwo %p/../Inputs/simple/notypes/b.dwo -o %t 2*9880d681SAndroid Build Coastguard WorkerRUN: llvm-dwarfdump %t | FileCheck --check-prefix=CHECK --check-prefix=NOTYP %s 3*9880d681SAndroid Build Coastguard WorkerRUN: llvm-objdump -h %t | FileCheck --check-prefix=NOTYPOBJ %s 4*9880d681SAndroid Build Coastguard WorkerUN: llvm-dwp %p/../Inputs/simple/types/a.dwo %p/../Inputs/simple/types/b.dwo -o %t 5*9880d681SAndroid Build Coastguard WorkerUN: llvm-dwarfdump %t | FileCheck --check-prefix=CHECK --check-prefix=TYPES %s 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard WorkerFIXME: For some reason, piping straight from llvm-dwp to llvm-dwarfdump doesn't behave well - looks like dwarfdump is reading/closes before dwp has finished. 8*9880d681SAndroid Build Coastguard Worker 9*9880d681SAndroid Build Coastguard WorkerDWP from non-type-unit debug info for these two translation units: 10*9880d681SAndroid Build Coastguard Workera.cpp: 11*9880d681SAndroid Build Coastguard Worker struct foo { }; 12*9880d681SAndroid Build Coastguard Worker foo a; 13*9880d681SAndroid Build Coastguard Worker 14*9880d681SAndroid Build Coastguard Workerb.cpp: 15*9880d681SAndroid Build Coastguard Worker struct bar { }; 16*9880d681SAndroid Build Coastguard Worker void b(bar) { 17*9880d681SAndroid Build Coastguard Worker } 18*9880d681SAndroid Build Coastguard Worker 19*9880d681SAndroid Build Coastguard WorkerCHECK-LABEL: .debug_abbrev.dwo contents: 20*9880d681SAndroid Build Coastguard WorkerCHECK-LABEL: Abbrev table for offset: 21*9880d681SAndroid Build Coastguard WorkerCHECK: 0x0000[[AAOFF:.*]] 22*9880d681SAndroid Build Coastguard WorkerCHECK: DW_TAG_compile_unit 23*9880d681SAndroid Build Coastguard WorkerCHECK: DW_TAG_variable 24*9880d681SAndroid Build Coastguard WorkerCHECK: DW_TAG_structure_type 25*9880d681SAndroid Build Coastguard WorkerCHECK-LABEL: Abbrev table for offset: 26*9880d681SAndroid Build Coastguard WorkerCHECK: 0x0000[[BAOFF:.*]] 27*9880d681SAndroid Build Coastguard WorkerCHECK: DW_TAG_compile_unit 28*9880d681SAndroid Build Coastguard WorkerCHECK: DW_TAG_structure_type 29*9880d681SAndroid Build Coastguard WorkerCHECK: DW_TAG_subprogram 30*9880d681SAndroid Build Coastguard WorkerCHECK: DW_TAG_formal_parameter 31*9880d681SAndroid Build Coastguard Worker 32*9880d681SAndroid Build Coastguard WorkerCHECK: .debug_info.dwo contents: 33*9880d681SAndroid Build Coastguard WorkerCHECK: [[AOFF:0x[0-9a-f]*]]: 34*9880d681SAndroid Build Coastguard WorkerCHECK-LABEL: Compile Unit: length = {{.*}} version = 0x0004 abbr_offset = 35*9880d681SAndroid Build Coastguard WorkerCHECK: 0x[[AAOFF]] addr_size = 0x08 (next unit at [[BOFF:.*]]) 36*9880d681SAndroid Build Coastguard WorkerCHECK: DW_TAG_compile_unit 37*9880d681SAndroid Build Coastguard WorkerCHECK: DW_AT_name {{.*}} "a.cpp" 38*9880d681SAndroid Build Coastguard WorkerCHECK: DW_AT_GNU_dwo_id {{.*}} ([[DWOA:.*]]) 39*9880d681SAndroid Build Coastguard WorkerCHECK: DW_TAG_variable 40*9880d681SAndroid Build Coastguard WorkerCHECK: DW_AT_name {{.*}} "a" 41*9880d681SAndroid Build Coastguard WorkerCHECK: DW_TAG_structure_type 42*9880d681SAndroid Build Coastguard WorkerNOTYP: DW_AT_name {{.*}} "foo" 43*9880d681SAndroid Build Coastguard WorkerTYPES: DW_AT_signature {{.*}} ([[FOOSIG:.*]]) 44*9880d681SAndroid Build Coastguard Worker 45*9880d681SAndroid Build Coastguard WorkerCHECK: [[BOFF]]: 46*9880d681SAndroid Build Coastguard WorkerCHECK-LABEL: Compile Unit: length = {{.*}} version = 0x0004 abbr_offset = 47*9880d681SAndroid Build Coastguard WorkerCHECK: 0x[[BAOFF]] addr_size = 0x08 (next unit at [[XOFF:.*]]) 48*9880d681SAndroid Build Coastguard WorkerCHECK: DW_AT_name {{.*}} "b.cpp" 49*9880d681SAndroid Build Coastguard WorkerCHECK: DW_AT_GNU_dwo_id {{.*}} ([[DWOB:.*]]) 50*9880d681SAndroid Build Coastguard WorkerCHECK: DW_TAG_structure_type 51*9880d681SAndroid Build Coastguard WorkerNOTYP: DW_AT_name {{.*}} "bar" 52*9880d681SAndroid Build Coastguard WorkerTYPES: DW_AT_signature {{.*}} ([[BARSIG:.*]]) 53*9880d681SAndroid Build Coastguard WorkerCHECK: DW_TAG_subprogram 54*9880d681SAndroid Build Coastguard WorkerCHECK: DW_AT_name {{.*}} "b" 55*9880d681SAndroid Build Coastguard WorkerCHECK: DW_TAG_formal_parameter 56*9880d681SAndroid Build Coastguard Worker 57*9880d681SAndroid Build Coastguard WorkerNOTYP-NOT: .debug_types.dwo contents: 58*9880d681SAndroid Build Coastguard WorkerTYPES-LABEL: .debug_types.dwo contents: 59*9880d681SAndroid Build Coastguard WorkerTYPES: [[FOOUOFF:0x[0-9a-f]*]]: 60*9880d681SAndroid Build Coastguard WorkerTYPES-LABEL: Type Unit: length = 0x00000020 version = 0x0004 abbr_offset = 61*9880d681SAndroid Build Coastguard WorkerTYPES: 0x[[AAOFF]] addr_size = 0x08 type_signature = [[FOOSIG]] type_offset = 0x[[FOOOFF:.*]] (next unit at [[BARUOFF:.*]]) 62*9880d681SAndroid Build Coastguard WorkerTYPES: DW_TAG_type_unit 63*9880d681SAndroid Build Coastguard WorkerTYPES: [[FOOOFF]]: DW_TAG_structure_type 64*9880d681SAndroid Build Coastguard WorkerTYPES: DW_AT_name {{.*}} "foo" 65*9880d681SAndroid Build Coastguard WorkerTYPES: [[BARUOFF]]: 66*9880d681SAndroid Build Coastguard WorkerTYPES-LABEL: Type Unit: length = 0x00000020 version = 0x0004 abbr_offset = 67*9880d681SAndroid Build Coastguard WorkerTYPES: 0x[[BAOFF]] addr_size = 0x08 type_signature = [[BARSIG]] type_offset = 0x001e (next unit at [[XUOFF:.*]]) 68*9880d681SAndroid Build Coastguard WorkerTYPES: DW_TAG_type_unit 69*9880d681SAndroid Build Coastguard WorkerTYPES: 0x00000042: DW_TAG_structure_type 70*9880d681SAndroid Build Coastguard WorkerTYPES: DW_AT_name {{.*}} "bar" 71*9880d681SAndroid Build Coastguard Worker 72*9880d681SAndroid Build Coastguard WorkerCHECK-LABEL: .debug_cu_index contents: 73*9880d681SAndroid Build Coastguard WorkerCHECK: Index Signature INFO ABBREV LINE STR_OFFSETS 74*9880d681SAndroid Build Coastguard WorkerTYPES: 1 [[DWOA]] {{\[}}[[AOFF]], [[BOFF]]) [0x0000[[AAOFF]], 0x0000[[BAOFF]]) [0x00000000, 0x0000001a) [0x00000000, 0x00000010) 75*9880d681SAndroid Build Coastguard WorkerTYPES: 3 [[DWOB]] {{\[}}[[BOFF]], [[XOFF]]) [0x0000[[BAOFF]], 0x00000099) [0x0000001a, 0x00000034) [0x00000010, 0x00000024) 76*9880d681SAndroid Build Coastguard WorkerNOTYP: 3 [[DWOA]] {{\[}}[[AOFF]], [[BOFF]]) [0x0000[[AAOFF]], 0x0000[[BAOFF]]) [0x00000000, 0x00000011) [0x00000000, 0x00000010) 77*9880d681SAndroid Build Coastguard WorkerNOTYP: 4 [[DWOB]] {{\[}}[[BOFF]], [[XOFF]]) [0x0000[[BAOFF]], 0x00000075) [0x00000011, 0x00000022) [0x00000010, 0x00000024) 78*9880d681SAndroid Build Coastguard Worker 79*9880d681SAndroid Build Coastguard WorkerCHECK-LABEL: .debug_tu_index contents: 80*9880d681SAndroid Build Coastguard WorkerNOTYP-NOT: Index 81*9880d681SAndroid Build Coastguard WorkerTYPES: Index Signature TYPES ABBREV LINE STR_OFFSETS 82*9880d681SAndroid Build Coastguard WorkerTYPES: 1 [[FOOSIG]] {{\[}}[[FOOUOFF]], [[BARUOFF]]) [0x0000[[AAOFF]], 0x0000[[BAOFF]]) [0x00000000, 0x0000001a) [0x00000000, 0x00000010) 83*9880d681SAndroid Build Coastguard WorkerTYPES: 4 [[BARSIG]] {{\[}}[[BARUOFF]], [[XUOFF]]) [0x0000[[BAOFF]], 0x00000099) [0x0000001a, 0x00000034) [0x00000010, 0x00000024) 84*9880d681SAndroid Build Coastguard Worker 85*9880d681SAndroid Build Coastguard WorkerEnsure we do not create a debug_tu_index, even an empty or malformed one. 86*9880d681SAndroid Build Coastguard WorkerNOTYPOBJ-NOT: .debug_tu_index 87*9880d681SAndroid Build Coastguard Worker 88*9880d681SAndroid Build Coastguard WorkerCHECK-LABEL: .debug_str.dwo contents: 89*9880d681SAndroid Build Coastguard WorkerCHECK: "clang version 90*9880d681SAndroid Build Coastguard WorkerCHECK: 0x[[ACPP:.*]]: "a.cpp" 91*9880d681SAndroid Build Coastguard WorkerCHECK-NOT: "clang version 92*9880d681SAndroid Build Coastguard WorkerCHECK: 0x[[BCPP:.*]]: "b.cpp" 93*9880d681SAndroid Build Coastguard Worker 94*9880d681SAndroid Build Coastguard WorkerCHECK-LABEL: .debug_str_offsets.dwo contents: 95*9880d681SAndroid Build Coastguard WorkerCHECK: : 00000000 96*9880d681SAndroid Build Coastguard WorkerCHECK: : [[ACPP]] 97*9880d681SAndroid Build Coastguard WorkerCHECK: : 00000000 98*9880d681SAndroid Build Coastguard WorkerCHECK: : [[BCPP]] 99