aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/tools/llvm-dwarfutil/ELF/X86/copy.test
blob: 8385813bbe54957620db852186c149bde4daf83b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
## This test checks that debug info contained in the source file
## is fully copied to the destination file in case --no-garbage-collection
## is specified.

# RUN: yaml2obj %p/Inputs/common.yaml -o %t.o

## Check that the resulting file contains debug info from source file.
# RUN: llvm-dwarfutil --no-garbage-collection %t.o %t1
# RUN: llvm-dwarfdump -a %t1 | FileCheck %s

## Check that the second copy matches with the first.
# RUN: llvm-dwarfutil --no-garbage-collection %t1 %t2
# RUN: cmp %t1 %t2

## Check that input file passed through <stdin> is correctly processesed.
# RUN: llvm-dwarfutil --no-garbage-collection - %t2 < %t1
# RUN: cmp %t1 %t2

# CHECK: .debug_abbrev
# CHECK: DW_TAG_compile_unit
# CHECK: .debug_info
# CHECK: DW_TAG_compile_unit
# CHECK: DW_AT_producer{{.*}}"by_hand"
# CHECK: DW_AT_language{{.*}}DW_LANG_C_plus_plus
# CHECK: DW_AT_name{{.*}}"CU1"
# CHECK: DW_TAG_class_type
# CHECK: DW_AT_name{{.*}}"class1"
# CHECK: DW_TAG_base_type
# CHECK: DW_AT_name{{.*}}"int"
# CHECK: DW_AT_name{{.*}}"char"
# CHECK: DW_AT_name{{.*}}"float"
# CHECK: DW_TAG_pointer_type
# CHECK: DW_TAG_variable
# CHECK: DW_AT_name{{.*}}"var1"