57 lines · plain
1## This test checks the --[no-]separate-debug-file option.2 3# RUN: yaml2obj %p/Inputs/common.yaml -o %t.o4 5## Check --garbage-collection --no-separate-debug-file.6# RUN: llvm-dwarfutil --garbage-collection --no-separate-debug-file %t.o %t27# RUN: llvm-dwarfdump -a %t2 | FileCheck --check-prefix=CHECK-DEBUG %s8 9## Check --garbage-collection --separate-debug-file.10# RUN: llvm-dwarfutil --garbage-collection --separate-debug-file %t.o %t211# RUN: llvm-objdump --headers %t2 | FileCheck --check-prefix=CHECK-NON-DEBUG %s12# RUN: llvm-dwarfdump -a %t2.debug | FileCheck --check-prefix=CHECK-DEBUG %s13 14## Check --no-garbage-collection --no-separate-debug-file.15# RUN: llvm-dwarfutil --no-garbage-collection --no-separate-debug-file %t.o %t116# RUN: llvm-dwarfdump -a %t1 | FileCheck --check-prefix=CHECK-DEBUG %s17 18## Check --no-garbage-collection --separate-debug-file.19# RUN: llvm-dwarfutil --no-garbage-collection %t.o --separate-debug-file %t320# RUN: llvm-objdump --headers %t3 | FileCheck --check-prefix=CHECK-NON-DEBUG %s21# RUN: llvm-dwarfdump -a %t3.debug | FileCheck --check-prefix=CHECK-DEBUG %s22## Copy result to compare it later.23# RUN: cp %t3 %t424# RUN: cp %t3.debug %t4.debug25 26## Check that --separate-debug-file wins if last.27# RUN: llvm-dwarfutil --no-garbage-collection --no-separate-debug-file --separate-debug-file %t.o %t328# RUN: cmp %t4 %t329# RUN: cmp %t4.debug %t3.debug30 31## Check that --no-separate-debug-file wins if last.32# RUN: llvm-dwarfutil --no-garbage-collection --separate-debug-file --no-separate-debug-file %t.o %t533# RUN: cmp %t1 %t534 35# CHECK-NON-DEBUG-NOT: .debug_abbrev36# CHECK-NON-DEBUG-NOT: .debug_info37# CHECK-NON-DEBUG: .gnu_debuglink38# CHECK-NON-DEBUG-NOT: .debug_abbrev39# CHECK-NON-DEBUG-NOT: .debug_info40 41# CHECK-DEBUG: .debug_abbrev42# CHECK-DEBUG: DW_TAG_compile_unit43# CHECK-DEBUG: .debug_info44# CHECK-DEBUG: DW_TAG_compile_unit45# CHECK-DEBUG: DW_AT_producer{{.*}}"by_hand"46# CHECK-DEBUG: DW_AT_language{{.*}}DW_LANG_C_plus_plus47# CHECK-DEBUG: DW_AT_name{{.*}}"CU1"48# CHECK-DEBUG: DW_TAG_class_type49# CHECK-DEBUG: DW_AT_name{{.*}}"class1"50# CHECK-DEBUG: DW_TAG_base_type51# CHECK-DEBUG: DW_AT_name{{.*}}"int"52# CHECK-DEBUG: DW_AT_name{{.*}}"char"53# CHECK-DEBUG: DW_AT_name{{.*}}"float"54# CHECK-DEBUG: DW_TAG_pointer_type55# CHECK-DEBUG: DW_TAG_variable56# CHECK-DEBUG: DW_AT_name{{.*}}"var1"57