1# RUN: dsymutil -f -oso-prepend-path=%p/../../dsymutil/ %p/../../dsymutil/Inputs/basic.macho.x86_64 -o %t1.dSYM
2# RUN: llvm-objdump -d -g --dsym=%t1.dSYM %p/../../dsymutil/Inputs/basic.macho.x86_64 >%t0
3# RUN: llvm-objdump -dg --dsym=%t1.dSYM %p/../../dsymutil/Inputs/basic.macho.x86_64 >%t1
4# RUN: cmp %t0 %t1
5# RUN: FileCheck --input-file %t0 %s
6
7# CHECK: Disassembly of section __TEXT,__text:
8
9# RUN: llvm-objdump --macho -d -g --dsym %p/Inputs/hello-macho-fat.dwarf %p/Inputs/hello-macho-fat | FileCheck --check-prefix MACHO_DSYM %s
10# RUN: llvm-objdump --macho -d -g --dsym %p/Inputs/hello-macho-fat.dwarf %p/Inputs/hello-macho-thin | FileCheck --check-prefix MACHO_DSYM %s
11# RUN: llvm-objdump --macho -d -g --dsym %p/Inputs/hello-macho-thin.dwarf %p/Inputs/hello-macho-thin | FileCheck --check-prefix MACHO_DSYM %s
12
13# MACHO_DSYM: (__TEXT,__text) section
14
15## Check that we report an error when .dSYM file is a valid object, which is
16## neither a Mach-O object nor Universal binary.
17
18# RUN: yaml2obj --docnum=1 %s -o %t.a
19# RUN: llvm-objdump --macho -d -g --dsym %t.a %p/../../dsymutil/Inputs/basic.macho.x86_64 2>&1 | \
20# RUN:   FileCheck -DDSYMFILE=%t.a --check-prefix=BAD_INPUT_AR %s
21
22# RUN: yaml2obj --docnum=2 %s -o %t.elf
23# RUN: llvm-objdump --macho -d -g --dsym %t.elf %p/../../dsymutil/Inputs/basic.macho.x86_64 2>&1 | \
24# RUN:   FileCheck -DDSYMFILE=%t.elf --check-prefix=BAD_INPUT_OBJ %s
25
26# BAD_INPUT_AR: error: [[DSYMFILE]] is not a Mach-O or Universal file type.
27# BAD_INPUT_OBJ: error: [[DSYMFILE]] is not a Mach-O file type.
28
29--- !Arch
30Members: []
31
32--- !ELF
33FileHeader:
34  Class: ELFCLASS64
35  Data:  ELFDATA2LSB
36  Type:  ET_REL
37