brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.8 KiB · af01d14 Raw
80 lines · plain
1# REQUIRES: system-linux2 3# RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-types-dwarf5-types-main.s -o %tmain.o4# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-types-dwarf5-types-helper.s -o %thelper.o5# RUN: %clang %cflags %tmain.o %thelper.o -o %t.exe -Wl,-q6# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections --debug-thread-count=4 --cu-processing-batch-size=47# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt | FileCheck --check-prefix=POSTCHECK %s8# RUN: llvm-dwarfdump --show-form --verbose --debug-types %t.bolt | FileCheck --check-prefix=POSTCHECKTU %s9 10## Check BOLT handles DWARF4/5 with fdebug-types.11 12# POSTCHECK: version = 0x000513# POSTCHECK: DW_TAG_type_unit14# POSTCHECK: DW_TAG_member15# POSTCHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0045 => {0x{{[0-9a-f]+}}} "char *")16# POSTCHECK: DW_TAG_pointer_type [4]17# POSTCHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x004a => {0x{{[0-9a-f]+}}} "char")18 19# POSTCHECK: version = 0x000520# POSTCHECK: DW_TAG_type_unit21# POSTCHECK: DW_TAG_structure_type22# POSTCHECK: DW_TAG_member23# POSTCHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x003c => {0x{{[0-9a-f]+}}} "char *")24# POSTCHECK: DW_TAG_member25# POSTCHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x003c => {0x{{[0-9a-f]+}}} "char *")26# POSTCHECK: DW_TAG_pointer_type [4]27# POSTCHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x0041 => {0x{{[0-9a-f]+}}} "char")28 29# POSTCHECK: version = 0x000430# POSTCHECK: DW_TAG_compile_unit31# POSTCHECK: DW_TAG_subprogram32# POSTCHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x007c => {0x{{[0-9a-f]+}}} "int")33# POSTCHECK: DW_TAG_formal_parameter34# POSTCHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x007c => {0x{{[0-9a-f]+}}} "int")35# POSTCHECK: DW_TAG_formal_parameter36# POSTCHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0083 => {0x{{[0-9a-f]+}}} "char **")37# POSTCHECK: DW_TAG_variable38# POSTCHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0094 => {0x{{[0-9a-f]+}}} "Foo")39# POSTCHECK: DW_TAG_base_type40# POSTCHECK: DW_TAG_pointer_type41 42# POSTCHECK: version = 0x000543# POSTCHECK: DW_TAG_compile_unit44# POSTCHECK: DW_TAG_subprogram45# POSTCHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x004b => {0x{{[0-9a-f]+}}} "int")46# POSTCHECK: DW_TAG_variable47# POSTCHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x004f => {0x{{[0-9a-f]+}}} "Foo2a")48# POSTCHECK: DW_TAG_base_type49# POSTCHECK: DW_TAG_structure_type50# POSTCHECK: DW_AT_signature [DW_FORM_ref_sig8]  (0x104ec427d2ebea6f)51# POSTCHECK: DW_TAG_structure_type52# POSTCHECK: DW_AT_signature [DW_FORM_ref_sig8]  (0xb4580bc1535df1e4)53 54# POSTCHECKTU: version = 0x000455# POSTCHECKTU-SAME: type_signature = 0x675d23e4f33235f256# POSTCHECKTU-SAME: type_offset = 0x001e57# POSTCHECKTU: DW_TAG_type_unit58# POSTCHECKTU: DW_TAG_member59# POSTCHECKTU: DW_AT_type [DW_FORM_ref4] (cu + 0x004c => {0x{{[0-9a-f]+}}} "char *")60# POSTCHECKTU: DW_TAG_member61# POSTCHECKTU: DW_AT_type [DW_FORM_ref4] (cu + 0x004c => {0x{{[0-9a-f]+}}} "char *")62# POSTCHECKTU: DW_TAG_pointer_type63# POSTCHECKTU-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x0051 => {0x{{[0-9a-f]+}}} "char")64# POSTCHECKTU: DW_TAG_base_type65# POSTCHECKTU: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]+}}] = "char")66 67# POSTCHECKTU: version = 0x000468# POSTCHECKTU-SAME: type_signature = 0x49dc260088be7e5669# POSTCHECKTU-SAME: type_offset = 0x001e70# POSTCHECKTU: DW_TAG_type_unit71# POSTCHECKTU: DW_TAG_structure_type72# POSTCHECKTU: DW_TAG_member73# POSTCHECKTU: DW_AT_type [DW_FORM_ref4] (cu + 0x0040 => {0x{{[0-9a-f]+}}} "char *")74# POSTCHECKTU: DW_TAG_member75# POSTCHECKTU: DW_AT_type [DW_FORM_ref4] (cu + 0x0040 => {0x{{[0-9a-f]+}}} "char *")76# POSTCHECKTU: DW_TAG_pointer_type77# POSTCHECKTU-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x0045 => {0x{{[0-9a-f]+}}} "char")78# POSTCHECKTU: DW_TAG_base_type79# POSTCHECKTU-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]+}}] = "char")80