2018-03-18 12:38:41 +01:00
|
|
|
RUN: dsymutil -no-output -verbose -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 | FileCheck %s
|
|
|
|
RUN: dsymutil -no-output -verbose -oso-prepend-path=%p %p/Inputs/basic-lto.macho.x86_64 | FileCheck %s --check-prefix=CHECK-LTO
|
|
|
|
RUN: dsymutil -no-output -verbose -oso-prepend-path=%p %p/Inputs/basic-archive.macho.x86_64 | FileCheck %s --check-prefix=CHECK-ARCHIVE
|
|
|
|
RUN: dsymutil -no-output -verbose -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 %p/Inputs/basic-lto.macho.x86_64 %p/Inputs/basic-archive.macho.x86_64 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-LTO --check-prefix=CHECK-ARCHIVE
|
2015-01-28 19:27:01 +01:00
|
|
|
|
|
|
|
This test check the basic Dwarf linking process through the debug dumps.
|
|
|
|
|
2015-02-14 00:18:34 +01:00
|
|
|
================================= Simple link ================================
|
2015-01-28 19:27:01 +01:00
|
|
|
CHECK: DEBUG MAP OBJECT: {{.*}}basic1.macho.x86_64.o
|
|
|
|
CHECK: Input compilation unit:
|
|
|
|
CHECK-NEXT: TAG_compile_unit
|
|
|
|
CHECK-NOT: TAG
|
|
|
|
CHECK: AT_name {{.*}}basic1.c
|
2015-02-14 00:18:34 +01:00
|
|
|
|
2015-01-28 19:27:01 +01:00
|
|
|
CHECK: DEBUG MAP OBJECT: {{.*}}basic2.macho.x86_64.o
|
|
|
|
CHECK: Input compilation unit:
|
|
|
|
CHECK-NEXT: TAG_compile_unit
|
|
|
|
CHECK-NOT: TAG
|
|
|
|
CHECK: AT_name {{.*}}basic2.c
|
2018-03-13 15:27:15 +01:00
|
|
|
|
|
|
|
CHECK: DEBUG MAP OBJECT: {{.*}}basic3.macho.x86_64.o
|
|
|
|
CHECK: Input compilation unit:
|
|
|
|
CHECK-NEXT: TAG_compile_unit
|
|
|
|
CHECK-NOT: TAG
|
|
|
|
CHECK: AT_name {{.*}}basic3.c
|
|
|
|
|
2015-02-14 00:18:34 +01:00
|
|
|
CHECK-NOT: Found valid debug map entry
|
2018-03-13 15:27:15 +01:00
|
|
|
CHECK: Found valid debug map entry: _main 0000000000000000 => 0000000100000ea0
|
|
|
|
CHECK-NEXT: DW_TAG_subprogram
|
|
|
|
CHECK-NEXT: DW_AT_name{{.*}}"main"
|
|
|
|
|
2015-02-14 00:18:34 +01:00
|
|
|
CHECK: Found valid debug map entry: _private_int 0000000000000560 => 0000000100001008
|
|
|
|
CHECK-NEXT: DW_TAG_variable
|
|
|
|
CHECK-NEXT: DW_AT_name {{.*}}"private_int"
|
|
|
|
CHECK-NOT: Found valid debug map entry
|
|
|
|
CHECK: Found valid debug map entry: _baz 0000000000000310 => 0000000100001000
|
|
|
|
CHECK-NEXT: DW_TAG_variable
|
|
|
|
CHECK-NEXT: DW_AT_name {{.*}}"baz"
|
|
|
|
CHECK-NOT: Found valid debug map entry
|
|
|
|
CHECK: Found valid debug map entry: _foo 0000000000000020 => 0000000100000ed0
|
|
|
|
CHECK-NEXT: DW_TAG_subprogram
|
|
|
|
CHECK-NEXT: DW_AT_name {{.*}}"foo"
|
|
|
|
CHECK-NOT: Found valid debug map entry
|
|
|
|
CHECK: Found valid debug map entry: _inc 0000000000000070 => 0000000100000f20
|
|
|
|
CHECK-NEXT: DW_TAG_subprogram
|
|
|
|
CHECK-NEXT: DW_AT_name {{.*}}"inc"
|
|
|
|
|
|
|
|
CHECK-NOT: Found valid debug map entry
|
2016-01-31 05:29:34 +01:00
|
|
|
CHECK: Found valid debug map entry: _val ffffffffffffffff => 0000000100001004
|
2015-02-14 00:18:34 +01:00
|
|
|
CHECK-NEXT: DW_TAG_variable
|
|
|
|
CHECK-NEXT: DW_AT_name {{.*}}"val"
|
|
|
|
CHECK-NOT: Found valid debug map entry
|
|
|
|
CHECK: Found valid debug map entry: _bar 0000000000000020 => 0000000100000f40
|
|
|
|
CHECK-NEXT: DW_TAG_subprogram
|
|
|
|
CHECK-NEXT: DW_AT_name {{.*}}"bar"
|
|
|
|
CHECK-NOT: Found valid debug map entry
|
|
|
|
CHECK: Found valid debug map entry: _inc 0000000000000070 => 0000000100000f90
|
|
|
|
CHECK-NEXT: DW_TAG_subprogram
|
|
|
|
CHECK-NEXT: DW_AT_name {{.*}}"inc")
|
2015-01-28 19:27:01 +01:00
|
|
|
|
|
|
|
|
2015-02-14 00:18:34 +01:00
|
|
|
================================= LTO link ================================
|
2015-01-28 19:27:01 +01:00
|
|
|
CHECK-LTO: DEBUG MAP OBJECT: {{.*}}basic-lto.macho.x86_64.o
|
|
|
|
CHECK-LTO: Input compilation unit:
|
|
|
|
CHECK-LTO-NEXT: TAG_compile_unit
|
|
|
|
CHECK-LTO-NOT: TAG
|
|
|
|
CHECK-LTO: AT_name {{.*}}basic1.c
|
|
|
|
CHECK-LTO: Input compilation unit:
|
|
|
|
CHECK-LTO-NEXT: TAG_compile_unit
|
|
|
|
CHECK-LTO-NOT: TAG
|
|
|
|
CHECK-LTO: AT_name {{.*}}basic2.c
|
|
|
|
CHECK-LTO: Input compilation unit:
|
|
|
|
CHECK-LTO-NEXT: TAG_compile_unit
|
|
|
|
CHECK-LTO-NOT: TAG
|
|
|
|
CHECK-LTO: AT_name {{.*}}basic3.c
|
|
|
|
|
2015-02-14 00:18:34 +01:00
|
|
|
CHECK-LTO-NOT: Found valid debug map entry
|
|
|
|
CHECK-LTO: Found valid debug map entry: _main 0000000000000000 => 0000000100000f40
|
|
|
|
CHECK-LTO-NEXT: DW_TAG_subprogram
|
|
|
|
CHECK-LTO-NEXT: DW_AT_name {{.*}}"main"
|
|
|
|
CHECK-LTO-NOT: Found valid debug map entry
|
|
|
|
CHECK-LTO: Found valid debug map entry: _private_int 00000000000008e8 => 0000000100001008
|
|
|
|
CHECK-LTO-NEXT: DW_TAG_variable
|
|
|
|
CHECK-LTO-NEXT: DW_AT_name {{.*}}"private_int"
|
|
|
|
CHECK-LTO-NOT: Found valid debug map entry
|
|
|
|
CHECK-LTO: Found valid debug map entry: _baz 0000000000000658 => 0000000100001000
|
|
|
|
CHECK-LTO-NEXT: DW_TAG_variable
|
|
|
|
CHECK-LTO-NEXT: DW_AT_name {{.*}} "baz"
|
|
|
|
CHECK-LTO-NOT: Found valid debug map entry
|
|
|
|
CHECK-LTO: Found valid debug map entry: _foo 0000000000000010 => 0000000100000f50
|
|
|
|
CHECK-LTO-NEXT: DW_TAG_subprogram
|
|
|
|
CHECK-LTO-NEXT: DW_AT_name {{.*}}"foo"
|
|
|
|
CHECK-LTO-NOT: Found valid debug map entry
|
|
|
|
CHECK-LTO: Found valid debug map entry: _val 00000000000008ec => 0000000100001004
|
|
|
|
CHECK-LTO-NEXT: DW_TAG_variable
|
|
|
|
CHECK-LTO-NEXT: DW_AT_name {{.*}}"val"
|
|
|
|
CHECK-LTO-NOT: Found valid debug map entry
|
|
|
|
CHECK-LTO: Found valid debug map entry: _bar 0000000000000050 => 0000000100000f90
|
|
|
|
CHECK-LTO-NEXT: DW_TAG_subprogram
|
|
|
|
CHECK-LTO-NEXT: DW_AT_name {{.*}}"bar"
|
|
|
|
|
2015-01-28 19:27:01 +01:00
|
|
|
|
2015-02-14 00:18:34 +01:00
|
|
|
================================= Archive link ================================
|
2015-01-28 19:27:01 +01:00
|
|
|
CHECK-ARCHIVE: DEBUG MAP OBJECT: {{.*}}basic1.macho.x86_64.o
|
|
|
|
CHECK-ARCHIVE: Input compilation unit:
|
|
|
|
CHECK-ARCHIVE-NEXT: TAG_compile_unit
|
|
|
|
CHECK-ARCHIVE-NOT: TAG
|
|
|
|
CHECK-ARCHIVE: AT_name {{.*}}basic1.c
|
2015-02-14 00:18:34 +01:00
|
|
|
|
2015-01-28 19:27:01 +01:00
|
|
|
CHECK-ARCHIVE: DEBUG MAP OBJECT: {{.*}}libbasic.a(basic2.macho.x86_64.o)
|
|
|
|
CHECK-ARCHIVE: Input compilation unit:
|
|
|
|
CHECK-ARCHIVE-NEXT: TAG_compile_unit
|
|
|
|
CHECK-ARCHIVE-NOT: TAG
|
|
|
|
CHECK-ARCHIVE: AT_name {{.*}}basic2.c
|
2018-03-13 15:27:15 +01:00
|
|
|
|
|
|
|
CHECK-ARCHIVE: DEBUG MAP OBJECT: {{.*}}libbasic.a(basic3.macho.x86_64.o)
|
|
|
|
CHECK-ARCHIVE: Input compilation unit:
|
|
|
|
CHECK-ARCHIVE-NEXT: TAG_compile_unit
|
|
|
|
CHECK-ARCHIVE-NOT: TAG
|
|
|
|
CHECK-ARCHIVE: AT_name {{.*}}basic3.c
|
|
|
|
|
|
|
|
CHECK-ARCHIVE-NOT: Found valid debug map entry
|
|
|
|
CHECK-ARCHIVE: Found valid debug map entry: _main 0000000000000000 => 0000000100000ea0
|
|
|
|
CHECK-ARCHIVE-NEXT: DW_TAG_subprogram
|
|
|
|
CHECK-ARCHIVE-NEXT: DW_AT_name{{.*}}"main"
|
|
|
|
|
2015-02-14 00:18:34 +01:00
|
|
|
CHECK-ARCHIVE-NOT: Found valid debug map entry
|
|
|
|
CHECK-ARCHIVE: Found valid debug map entry: _private_int 0000000000000560 => 0000000100001004
|
|
|
|
CHECK-ARCHIVE-NEXT: DW_TAG_variable
|
|
|
|
CHECK-ARCHIVE-NEXT: DW_AT_name {{.*}}"private_int"
|
|
|
|
CHECK-ARCHIVE-NOT: Found valid debug map entry
|
|
|
|
CHECK-ARCHIVE: Found valid debug map entry: _baz 0000000000000310 => 0000000100001000
|
|
|
|
CHECK-ARCHIVE-NEXT: DW_TAG_variable
|
|
|
|
CHECK-ARCHIVE-NEXT: DW_AT_name {{.*}}"baz"
|
|
|
|
CHECK-ARCHIVE-NOT: Found valid debug map entry
|
|
|
|
CHECK-ARCHIVE: Found valid debug map entry: _foo 0000000000000020 => 0000000100000ed0
|
|
|
|
CHECK-ARCHIVE-NEXT: DW_TAG_subprogram
|
|
|
|
CHECK-ARCHIVE-NEXT: DW_AT_name {{.*}}"foo"
|
|
|
|
CHECK-ARCHIVE-NOT: Found valid debug map entry
|
|
|
|
CHECK-ARCHIVE: Found valid debug map entry: _inc 0000000000000070 => 0000000100000f20
|
|
|
|
CHECK-ARCHIVE-NEXT: DW_TAG_subprogram
|
|
|
|
CHECK-ARCHIVE-NEXT: DW_AT_name {{.*}}"inc"
|
|
|
|
|
|
|
|
CHECK-ARCHIVE-NOT: Found valid debug map entry
|
2016-01-31 05:29:34 +01:00
|
|
|
CHECK-ARCHIVE: Found valid debug map entry: _val ffffffffffffffff => 0000000100001008
|
2015-02-14 00:18:34 +01:00
|
|
|
CHECK-ARCHIVE-NEXT: DW_TAG_variable
|
|
|
|
CHECK-ARCHIVE-NEXT: DW_AT_name {{.*}}"val"
|
|
|
|
CHECK-ARCHIVE-NOT: Found valid debug map entry
|
|
|
|
CHECK-ARCHIVE: Found valid debug map entry: _bar 0000000000000020 => 0000000100000f40
|
|
|
|
CHECK-ARCHIVE-NEXT: DW_TAG_subprogram
|
|
|
|
CHECK-ARCHIVE-NEXT: DW_AT_name {{.*}}"bar"
|
|
|
|
CHECK-ARCHIVE-NOT: Found valid debug map entry
|
|
|
|
CHECK-ARCHIVE: Found valid debug map entry: _inc 0000000000000070 => 0000000100000f90
|
|
|
|
CHECK-ARCHIVE-NEXT: DW_TAG_subprogram
|
|
|
|
CHECK-ARCHIVE-NEXT: DW_AT_name {{.*}}"inc")
|