diff options
Diffstat (limited to 'llvm/test/tools/dsymutil/X86')
-rw-r--r-- | llvm/test/tools/dsymutil/X86/basic-linking-bundle.test | 2 | ||||
-rw-r--r-- | llvm/test/tools/dsymutil/X86/basic-linking-x86.test | 66 | ||||
-rw-r--r-- | llvm/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test | 214 | ||||
-rw-r--r-- | llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test | 21 | ||||
-rw-r--r-- | llvm/test/tools/dsymutil/X86/dsym-companion.test | 4 | ||||
-rw-r--r-- | llvm/test/tools/dsymutil/X86/frame-2.test | 10 | ||||
-rw-r--r-- | llvm/test/tools/dsymutil/X86/label2.test | 21 | ||||
-rw-r--r-- | llvm/test/tools/dsymutil/X86/minimize.test | 9 | ||||
-rw-r--r-- | llvm/test/tools/dsymutil/X86/thinlto.test | 24 | ||||
-rw-r--r-- | llvm/test/tools/dsymutil/X86/update.test | 12 |
10 files changed, 283 insertions, 100 deletions
diff --git a/llvm/test/tools/dsymutil/X86/basic-linking-bundle.test b/llvm/test/tools/dsymutil/X86/basic-linking-bundle.test index 650ed1a8484c..0e8cc2e61dad 100644 --- a/llvm/test/tools/dsymutil/X86/basic-linking-bundle.test +++ b/llvm/test/tools/dsymutil/X86/basic-linking-bundle.test @@ -2,7 +2,7 @@ RUN: rm -rf %t RUN: mkdir -p %t/dsymdest RUN: cat %p/../Inputs/basic.macho.x86_64 > %t/basic.macho.x86_64 -RUN: dsymutil -oso-prepend-path=%p/.. %t/basic.macho.x86_64 +RUN: dsymutil -accelerator=Pub -oso-prepend-path=%p/.. %t/basic.macho.x86_64 Check that the object file in the bundle exists and is sane: RUN: llvm-dwarfdump -a %t/basic.macho.x86_64.dSYM/Contents/Resources/DWARF/basic.macho.x86_64 | FileCheck %S/basic-linking-x86.test diff --git a/llvm/test/tools/dsymutil/X86/basic-linking-x86.test b/llvm/test/tools/dsymutil/X86/basic-linking-x86.test index 754aaf3d4e89..13ea0858437f 100644 --- a/llvm/test/tools/dsymutil/X86/basic-linking-x86.test +++ b/llvm/test/tools/dsymutil/X86/basic-linking-x86.test @@ -1,12 +1,12 @@ RUN: cat %p/../Inputs/basic.macho.x86_64 > %t1 -RUN: dsymutil -f -oso-prepend-path=%p/.. %t1 +RUN: dsymutil -accelerator=Pub -f -oso-prepend-path=%p/.. %t1 RUN: llvm-dwarfdump -a %t1.dwarf | FileCheck %s -RUN: dsymutil -f -o %t2 -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 +RUN: dsymutil -accelerator=Pub -f -o %t2 -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 RUN: llvm-dwarfdump -a %t2 | FileCheck %s -RUN: dsymutil -f -o - -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,BASIC -RUN: dsymutil -f -o - -oso-prepend-path=%p/.. %p/../Inputs/basic-archive.macho.x86_64 | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,ARCHIVE -RUN: dsymutil -dump-debug-map -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 | dsymutil -f -y -o - - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,BASIC -RUN: dsymutil -dump-debug-map -oso-prepend-path=%p/.. %p/../Inputs/basic-archive.macho.x86_64 | dsymutil -f -o - -y - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,ARCHIVE +RUN: dsymutil -accelerator=Pub -f -o - -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,BASIC,PUB +RUN: dsymutil -accelerator=Pub -f -o - -oso-prepend-path=%p/.. %p/../Inputs/basic-archive.macho.x86_64 | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,ARCHIVE,PUB +RUN: dsymutil -accelerator=Pub -dump-debug-map -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 | dsymutil -accelerator=Pub -f -y -o - - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,BASIC,PUB +RUN: dsymutil -accelerator=Pub -dump-debug-map -oso-prepend-path=%p/.. %p/../Inputs/basic-archive.macho.x86_64 | dsymutil -accelerator=Pub -f -o - -y - | llvm-dwarfdump -a - | FileCheck %s --check-prefixes=CHECK,ARCHIVE,PUB CHECK: file format Mach-O 64-bit x86-64 @@ -189,30 +189,30 @@ CHECK-NEXT: 0x0000000100000f90 11 0 1 0 0 is_stmt CHECK-NEXT: 0x0000000100000f9b 12 0 1 0 0 is_stmt prologue_end CHECK-NEXT: 0x0000000100000fa9 12 0 1 0 0 is_stmt end_sequence -CHECK: .debug_pubnames contents: -CHECK-NEXT: length = 0x00000017, format = DWARF32, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000081 -CHECK-NEXT: Offset Name -CHECK-NEXT: 0x00000026 "main" -CHECK-NEXT: length = 0x00000036, format = DWARF32, version = 0x0002, unit_offset = 0x00000081, unit_size = 0x000000a5 -CHECK-NEXT: Offset Name -CHECK-NEXT: 0x0000002d "private_int" -CHECK-NEXT: 0x00000042 "baz" -CHECK-NEXT: 0x00000057 "foo" -CHECK-NEXT: 0x00000086 "inc" -CHECK-NEXT: length = 0x00000026, format = DWARF32, version = 0x0002, unit_offset = 0x00000126, unit_size = 0x00000096 -CHECK-NEXT: Offset Name -CHECK-NEXT: 0x00000026 "val" -CHECK-NEXT: 0x00000048 "bar" -CHECK-NEXT: 0x00000077 "inc" - -CHECK: .debug_pubtypes contents: -CHECK-NEXT: length = 0x0000001f, format = DWARF32, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000081 -CHECK-NEXT: Offset Name -CHECK-NEXT: 0x00000063 "int" -CHECK-NEXT: 0x00000079 "char" -CHECK-NEXT: length = 0x00000016, format = DWARF32, version = 0x0002, unit_offset = 0x00000081, unit_size = 0x000000a5 -CHECK-NEXT: Offset Name -CHECK-NEXT: 0x00000026 "int" -CHECK-NEXT: length = 0x00000016, format = DWARF32, version = 0x0002, unit_offset = 0x00000126, unit_size = 0x00000096 -CHECK-NEXT: Offset Name -CHECK-NEXT: 0x00000041 "int" +PUB: .debug_pubnames contents: +PUB-NEXT: length = 0x00000017, format = DWARF32, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000081 +PUB-NEXT: Offset Name +PUB-NEXT: 0x00000026 "main" +PUB-NEXT: length = 0x00000036, format = DWARF32, version = 0x0002, unit_offset = 0x00000081, unit_size = 0x000000a5 +PUB-NEXT: Offset Name +PUB-NEXT: 0x0000002d "private_int" +PUB-NEXT: 0x00000042 "baz" +PUB-NEXT: 0x00000057 "foo" +PUB-NEXT: 0x00000086 "inc" +PUB-NEXT: length = 0x00000026, format = DWARF32, version = 0x0002, unit_offset = 0x00000126, unit_size = 0x00000096 +PUB-NEXT: Offset Name +PUB-NEXT: 0x00000026 "val" +PUB-NEXT: 0x00000048 "bar" +PUB-NEXT: 0x00000077 "inc" + +PUB: .debug_pubtypes contents: +PUB-NEXT: length = 0x0000001f, format = DWARF32, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000081 +PUB-NEXT: Offset Name +PUB-NEXT: 0x00000063 "int" +PUB-NEXT: 0x00000079 "char" +PUB-NEXT: length = 0x00000016, format = DWARF32, version = 0x0002, unit_offset = 0x00000081, unit_size = 0x000000a5 +PUB-NEXT: Offset Name +PUB-NEXT: 0x00000026 "int" +PUB-NEXT: length = 0x00000016, format = DWARF32, version = 0x0002, unit_offset = 0x00000126, unit_size = 0x00000096 +PUB-NEXT: Offset Name +PUB-NEXT: 0x00000041 "int" diff --git a/llvm/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test b/llvm/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test index e1dc3f411cb4..867d822a9d9b 100644 --- a/llvm/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test +++ b/llvm/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test @@ -179,24 +179,196 @@ CHECK-NEXT: 0x0000000100000fab 19 10 1 0 0 CHECK-NEXT: 0x0000000100000fb2 20 1 1 0 0 is_stmt CHECK-NEXT: 0x0000000100000fb4 20 1 1 0 0 is_stmt end_sequence -CHECK: .debug_pubnames contents: -CHECK-NEXT: length = 0x00000017, format = DWARF32, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000077 -CHECK-NEXT: Offset Name -CHECK-NEXT: 0x0000002a "main" -CHECK-NEXT: length = 0x0000002e, format = DWARF32, version = 0x0002, unit_offset = 0x00000077, unit_size = 0x000000a4 -CHECK-NEXT: Offset Name -CHECK-NEXT: 0x00000031 "baz" -CHECK-NEXT: 0x00000046 "private_int" -CHECK-NEXT: 0x00000067 "foo" -CHECK-NEXT: length = 0x0000001e, format = DWARF32, version = 0x0002, unit_offset = 0x0000011b, unit_size = 0x00000085 -CHECK-NEXT: Offset Name -CHECK-NEXT: 0x0000002a "val" -CHECK-NEXT: 0x00000050 "bar" - -CHECK: .debug_pubtypes contents: -CHECK-NEXT: length = 0x00000017, format = DWARF32, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000077 -CHECK-NEXT: Offset Name -CHECK-NEXT: 0x0000006f "char" -CHECK-NEXT: length = 0x00000016, format = DWARF32, version = 0x0002, unit_offset = 0x00000077, unit_size = 0x000000a4 -CHECK-NEXT: Offset Name -CHECK-NEXT: 0x0000002a "int" +CHECK-NOT: .debug_pubnames contents: +CHECK-NOT: .debug_pubtypes contents: + +CHECK: .apple_names contents: +CHECK-NEXT: Header { +CHECK-NEXT: Magic: 0x48415348 +CHECK-NEXT: Version: 0x1 +CHECK-NEXT: Hash function: 0x0 +CHECK-NEXT: Bucket count: 7 +CHECK-NEXT: Hashes count: 7 +CHECK-NEXT: HeaderData length: 12 +CHECK-NEXT: } +CHECK-NEXT: DIE offset base: 0 +CHECK-NEXT: Number of atoms: 1 +CHECK-NEXT: Atoms [ +CHECK-NEXT: Atom 0 { +CHECK-NEXT: Type: DW_ATOM_die_offset +CHECK-NEXT: Form: DW_FORM_data4 +CHECK-NEXT: } +CHECK-NEXT: ] +CHECK-NEXT: Bucket 0 [ +CHECK-NEXT: Hash 0xb8860c2 [ +CHECK-NEXT: Name@0x74 { +CHECK-NEXT: String: 0x00000048 "baz" +CHECK-NEXT: Data 0 [ +CHECK-NEXT: Atom[0]: 0x000000a8 +CHECK-NEXT: ] +CHECK-NEXT: } +CHECK-NEXT: ] +CHECK-NEXT: Hash 0xb88801f [ +CHECK-NEXT: Name@0x84 { +CHECK-NEXT: String: 0x00000058 "inc" +CHECK-NEXT: Data 0 [ +CHECK-NEXT: Atom[0]: 0x00000106 +CHECK-NEXT: ] +CHECK-NEXT: Data 1 [ +CHECK-NEXT: Atom[0]: 0x00000193 +CHECK-NEXT: ] +CHECK-NEXT: } +CHECK-NEXT: ] +CHECK-NEXT: ] +CHECK-NEXT: Bucket 1 [ +CHECK-NEXT: EMPTY +CHECK-NEXT: ] +CHECK-NEXT: Bucket 2 [ +CHECK-NEXT: Hash 0xfed12c6a [ +CHECK-NEXT: Name@0x98 { +CHECK-NEXT: String: 0x0000004c "private_int" +CHECK-NEXT: Data 0 [ +CHECK-NEXT: Atom[0]: 0x000000bd +CHECK-NEXT: ] +CHECK-NEXT: } +CHECK-NEXT: ] +CHECK-NEXT: ] +CHECK-NEXT: Bucket 3 [ +CHECK-NEXT: Hash 0xb88b5c8 [ +CHECK-NEXT: Name@0xa8 { +CHECK-NEXT: String: 0x0000006d "val" +CHECK-NEXT: Data 0 [ +CHECK-NEXT: Atom[0]: 0x00000145 +CHECK-NEXT: ] +CHECK-NEXT: } +CHECK-NEXT: ] +CHECK-NEXT: Hash 0x7c9a7f6a [ +CHECK-NEXT: Name@0xb8 { +CHECK-NEXT: String: 0x00000027 "main" +CHECK-NEXT: Data 0 [ +CHECK-NEXT: Atom[0]: 0x0000002a +CHECK-NEXT: ] +CHECK-NEXT: } +CHECK-NEXT: ] +CHECK-NEXT: ] +CHECK-NEXT: Bucket 4 [ +CHECK-NEXT: EMPTY +CHECK-NEXT: ] +CHECK-NEXT: Bucket 5 [ +CHECK-NEXT: Hash 0xb887389 [ +CHECK-NEXT: Name@0xc8 { +CHECK-NEXT: String: 0x0000005c "foo" +CHECK-NEXT: Data 0 [ +CHECK-NEXT: Atom[0]: 0x000000de +CHECK-NEXT: ] +CHECK-NEXT: } +CHECK-NEXT: ] +CHECK-NEXT: ] +CHECK-NEXT: Bucket 6 [ +CHECK-NEXT: Hash 0xb8860ba [ +CHECK-NEXT: Name@0xd8 { +CHECK-NEXT: String: 0x00000071 "bar" +CHECK-NEXT: Data 0 [ +CHECK-NEXT: Atom[0]: 0x0000016b +CHECK-NEXT: ] +CHECK-NEXT: } +CHECK-NEXT: ] +CHECK-NEXT: ] + +CHECK: .apple_types contents: +CHECK-NEXT: Header { +CHECK-NEXT: Magic: 0x48415348 +CHECK-NEXT: Version: 0x1 +CHECK-NEXT: Hash function: 0x0 +CHECK-NEXT: Bucket count: 2 +CHECK-NEXT: Hashes count: 2 +CHECK-NEXT: HeaderData length: 24 +CHECK-NEXT: } +CHECK-NEXT: DIE offset base: 0 +CHECK-NEXT: Number of atoms: 4 +CHECK-NEXT: Atoms [ +CHECK-NEXT: Atom 0 { +CHECK-NEXT: Type: DW_ATOM_die_offset +CHECK-NEXT: Form: DW_FORM_data4 +CHECK-NEXT: } +CHECK-NEXT: Atom 1 { +CHECK-NEXT: Type: DW_ATOM_die_tag +CHECK-NEXT: Form: DW_FORM_data2 +CHECK-NEXT: } +CHECK-NEXT: Atom 2 { +CHECK-NEXT: Type: DW_ATOM_type_flags +CHECK-NEXT: Form: DW_FORM_data1 +CHECK-NEXT: } +CHECK-NEXT: Atom 3 { +CHECK-NEXT: Type: DW_ATOM_qual_name_hash +CHECK-NEXT: Form: DW_FORM_data4 +CHECK-NEXT: } +CHECK-NEXT: ] +CHECK-NEXT: Bucket 0 [ +CHECK-NEXT: Hash 0xb888030 [ +CHECK-NEXT: Name@0x44 { +CHECK-NEXT: String: 0x00000044 "int" +CHECK-NEXT: Data 0 [ +CHECK-NEXT: Atom[0]: 0x000000a1 +CHECK-NEXT: Atom[1]: 0x0024 (DW_TAG_base_type) +CHECK-NEXT: Atom[2]: 0x00 +CHECK-NEXT: Atom[3]: 0x0c3a28a4 +CHECK-NEXT: ] +CHECK-NEXT: } +CHECK-NEXT: ] +CHECK-NEXT: ] +CHECK-NEXT: Bucket 1 [ +CHECK-NEXT: Hash 0x7c952063 [ +CHECK-NEXT: Name@0x5b { +CHECK-NEXT: String: 0x00000036 "char" +CHECK-NEXT: Data 0 [ +CHECK-NEXT: Atom[0]: 0x0000006f +CHECK-NEXT: Atom[1]: 0x0024 (DW_TAG_base_type) +CHECK-NEXT: Atom[2]: 0x00 +CHECK-NEXT: Atom[3]: 0x937bd757 +CHECK-NEXT: ] +CHECK-NEXT: } +CHECK-NEXT: ] +CHECK-NEXT: ] + +CHECK: .apple_namespaces contents: +CHECK-NEXT: Header { +CHECK-NEXT: Magic: 0x48415348 +CHECK-NEXT: Version: 0x1 +CHECK-NEXT: Hash function: 0x0 +CHECK-NEXT: Bucket count: 1 +CHECK-NEXT: Hashes count: 0 +CHECK-NEXT: HeaderData length: 12 +CHECK-NEXT: } +CHECK-NEXT: DIE offset base: 0 +CHECK-NEXT: Number of atoms: 1 +CHECK-NEXT: Atoms [ +CHECK-NEXT: Atom 0 { +CHECK-NEXT: Type: DW_ATOM_die_offset +CHECK-NEXT: Form: DW_FORM_data4 +CHECK-NEXT: } +CHECK-NEXT: ] +CHECK-NEXT: Bucket 0 [ +CHECK-NEXT: EMPTY +CHECK-NEXT: ] + +CHECK: .apple_objc contents: +CHECK-NEXT: Header { +CHECK-NEXT: Magic: 0x48415348 +CHECK-NEXT: Version: 0x1 +CHECK-NEXT: Hash function: 0x0 +CHECK-NEXT: Bucket count: 1 +CHECK-NEXT: Hashes count: 0 +CHECK-NEXT: HeaderData length: 12 +CHECK-NEXT: } +CHECK-NEXT: DIE offset base: 0 +CHECK-NEXT: Number of atoms: 1 +CHECK-NEXT: Atoms [ +CHECK-NEXT: Atom 0 { +CHECK-NEXT: Type: DW_ATOM_die_offset +CHECK-NEXT: Form: DW_FORM_data4 +CHECK-NEXT: } +CHECK-NEXT: ] +CHECK-NEXT: Bucket 0 [ +CHECK-NEXT: EMPTY +CHECK-NEXT: ] diff --git a/llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test b/llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test index 509755a52155..4e5d142315f1 100644 --- a/llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test +++ b/llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test @@ -178,25 +178,8 @@ CHECK: 0x0000000100000fa9 19 0 1 0 0 is_stmt CHECK: 0x0000000100000fb2 20 0 1 0 0 is_stmt CHECK: 0x0000000100000fb4 20 0 1 0 0 is_stmt end_sequence -CHECK: .debug_pubnames contents: -CHECK-NEXT: length = 0x00000017, format = DWARF32, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000081 -CHECK-NEXT: Offset Name -CHECK-NEXT: 0x00000026 "main" -CHECK-NEXT: length = 0x0000002e, format = DWARF32, version = 0x0002, unit_offset = 0x00000081, unit_size = 0x000000b9 -CHECK-NEXT: Offset Name -CHECK-NEXT: 0x00000026 "private_int" -CHECK-NEXT: 0x0000003f "baz" -CHECK-NEXT: 0x00000058 "foo" -CHECK-NEXT: length = 0x0000001e, format = DWARF32, version = 0x0002, unit_offset = 0x0000013a, unit_size = 0x000000ac -CHECK-NEXT: Offset Name -CHECK-NEXT: 0x00000026 "val" -CHECK-NEXT: 0x00000045 "bar" - -CHECK: .debug_pubtypes contents: -CHECK-NEXT: length = 0x0000001f, format = DWARF32, version = 0x0002, unit_offset = 0x00000000, unit_size = 0x00000081 -CHECK-NEXT: Offset Name -CHECK-NEXT: 0x00000063 "int" -CHECK-NEXT: 0x00000079 "char" +CHECK-NOT: .debug_pubnames contents: +CHECK-NOT: .debug_pubtypes contents: CHECK: .apple_names contents: CHECK-NEXT: Header { diff --git a/llvm/test/tools/dsymutil/X86/dsym-companion.test b/llvm/test/tools/dsymutil/X86/dsym-companion.test index c9b0a1aa4f8d..d81ad7dc9244 100644 --- a/llvm/test/tools/dsymutil/X86/dsym-companion.test +++ b/llvm/test/tools/dsymutil/X86/dsym-companion.test @@ -1,5 +1,5 @@ -RUN: dsymutil -o - %p/../Inputs/basic.macho.i386 -f | llvm-readobj --file-headers -l -S --symbols - | FileCheck %s -check-prefixes=CHECK,CHECK32 -RUN: dsymutil -o - -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 -f | llvm-readobj --file-headers -l -S --symbols - | FileCheck %s -check-prefixes=CHECK,CHECK64 +RUN: dsymutil -accelerator=Pub -o - %p/../Inputs/basic.macho.i386 -f | llvm-readobj --file-headers -l -S --symbols - | FileCheck %s -check-prefixes=CHECK,CHECK32 +RUN: dsymutil -accelerator=Pub -o - -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 -f | llvm-readobj --file-headers -l -S --symbols - | FileCheck %s -check-prefixes=CHECK,CHECK64 This test checks that the dSYM companion binaries generated in 32 and 64 bits are correct. The check are pretty strict (we check even the offsets and sizes diff --git a/llvm/test/tools/dsymutil/X86/frame-2.test b/llvm/test/tools/dsymutil/X86/frame-2.test index 235d2ca18ca1..4ae94e25f7ca 100644 --- a/llvm/test/tools/dsymutil/X86/frame-2.test +++ b/llvm/test/tools/dsymutil/X86/frame-2.test @@ -7,9 +7,6 @@ # Check the handling of multiple different CIEs. To have CIEs that # appear to be different, use a dwarf2 version of the file along with # a dwarf 4 version. The CIE header version (and layout) will be different. -# FIXME: this test also checks that we didn't reuse the first CIE when it -# appears again. This is a behavior we inherited from dsymutil-classic -# but this should be fixed (see comment in patchFrameInfoForObject()) --- triple: 'i386-apple-darwin' objects: @@ -39,11 +36,6 @@ objects: # CHECK-NEXT: Version:{{.*}}4 # CHECK-NOT: FDE # CHECK: FDE cie=[[CIEDW4]] pc=00003000...00003 -# CHECK-NOT: FDE -# CHECK: [[CIEDW2:[0-9a-f]*]] {{[0-9a-f]*}} ffffffff CIE -# CHECK-NEXT: Format: DWARF32 -# CHECK-NEXT: Version:{{.*}}1 -# CHECK-NOT: FDE -# CHECK: FDE cie=[[CIEDW2]] pc=00004000...00004 +# CHECK: FDE cie=00000000 pc=00004000...00004 # CHECK-NOT: FDE # CHECK: .eh_frame contents: diff --git a/llvm/test/tools/dsymutil/X86/label2.test b/llvm/test/tools/dsymutil/X86/label2.test new file mode 100644 index 000000000000..0517d1e7135b --- /dev/null +++ b/llvm/test/tools/dsymutil/X86/label2.test @@ -0,0 +1,21 @@ +$ cat label.c +int main(int argc, char **argv) { + if (argc) { + goto foobar; + } + return 1; +foobar: + return 0; +} + +$ clang -g label.c -c -o label.o +$ clang label.o -o label.out + +RUN: dsymutil -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/label/label.out -o %t.dSYM +RUN: llvm-dwarfdump %t.dSYM | FileCheck %s + +CHECK: DW_TAG_label +CHECK-NEXT: DW_AT_name ("foobar") +CHECK-NEXT: DW_AT_decl_file ("/tmp/label{{[/\\]}}label.c") +CHECK-NEXT: DW_AT_decl_line (6) +CHECK-NEXT: DW_AT_low_pc (0x0000000100003f9d) diff --git a/llvm/test/tools/dsymutil/X86/minimize.test b/llvm/test/tools/dsymutil/X86/minimize.test deleted file mode 100644 index 4e2d5b568396..000000000000 --- a/llvm/test/tools/dsymutil/X86/minimize.test +++ /dev/null @@ -1,9 +0,0 @@ -RUN: dsymutil -f -o - -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 | llvm-readobj --sections - | FileCheck %s --check-prefix=FULL -RUN: dsymutil --minimize -f -o - -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 | llvm-readobj --sections - | FileCheck %s -RUN: dsymutil -z -f -o - -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 | llvm-readobj --sections - | FileCheck %s - -FULL: Name: __debug_pubnames -FULL: Name: __debug_pubtypes - -CHECK-NOT: Name: __debug_pubnames -CHECK-NOT: Name: __debug_pubtypes diff --git a/llvm/test/tools/dsymutil/X86/thinlto.test b/llvm/test/tools/dsymutil/X86/thinlto.test new file mode 100644 index 000000000000..ebd4068a5c12 --- /dev/null +++ b/llvm/test/tools/dsymutil/X86/thinlto.test @@ -0,0 +1,24 @@ +$ cat foo.cpp +struct nontrivial { + nontrivial() { } +}; + +void function2() +{ + static const nontrivial magic_static; +} + +$ cat bar.cpp +void function2(); + +void function1() +{ + function2(); +} + +$ xcrun clang++ -g -flto=thin -O2 foo.cpp bar.cpp -c +$ xcrun clang++ -flto=thin foo.o bar.o -Xlinker -object_path_lto -Xlinker lto -shared -o foobar.dylib + +RUN: dsymutil -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/thinlto/foobar.dylib -o %t.dSYM 2>&1 | FileCheck %s --allow-empty +CHECK-NOT: could not find object file symbol for symbol __ZZ9function2vE12magic_static +CHECK-NOT: could not find object file symbol for symbol __ZGVZ9function2vE12magic_static diff --git a/llvm/test/tools/dsymutil/X86/update.test b/llvm/test/tools/dsymutil/X86/update.test index 804091ab2943..d6c900911f52 100644 --- a/llvm/test/tools/dsymutil/X86/update.test +++ b/llvm/test/tools/dsymutil/X86/update.test @@ -1,15 +1,15 @@ RUN: rm -rf %t.dir RUN: mkdir -p %t.dir RUN: cat %p/../Inputs/basic.macho.x86_64 > %t.dir/basic -RUN: dsymutil -oso-prepend-path=%p/.. %t.dir/basic +RUN: dsymutil -accelerator=Pub -oso-prepend-path=%p/.. %t.dir/basic RUN: llvm-dwarfdump -a %t.dir/basic.dSYM | FileCheck %S/basic-linking-x86.test -RUN: dsymutil --update %t.dir/basic.dSYM +RUN: dsymutil -accelerator=Pub --update %t.dir/basic.dSYM RUN: llvm-dwarfdump -a %t.dir/basic.dSYM | FileCheck %S/basic-linking-x86.test -RUN: dsymutil -u %t.dir/basic.dSYM +RUN: dsymutil -accelerator=Pub -u %t.dir/basic.dSYM RUN: llvm-dwarfdump -a %t.dir/basic.dSYM | FileCheck %S/basic-linking-x86.test -RUN: dsymutil --update %t.dir/basic.dSYM -o %t.dir/updated.dSYM +RUN: dsymutil -accelerator=Pub --update %t.dir/basic.dSYM -o %t.dir/updated.dSYM RUN: llvm-dwarfdump -a %t.dir/updated.dSYM | FileCheck %S/basic-linking-x86.test -RUN: dsymutil -f -o %t2 -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 -RUN: dsymutil -f -u %t2 -o %t3 +RUN: dsymutil -accelerator=Pub -f -o %t2 -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 +RUN: dsymutil -accelerator=Pub -f -u %t2 -o %t3 RUN: llvm-dwarfdump -a %t3 | FileCheck %S/basic-linking-x86.test |