brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.4 KiB · 66c0a3b Raw
127 lines · plain
1; RUN: rm -rf %t2; RUN: mkdir %t3; RUN: cd %t4; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-df-mono-main.s \5; RUN: -split-dwarf-file=main.dwo -o main.o6; RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux-gnu %p/Inputs/dwarf5-df-mono-helper.s -o=helper.o7; RUN: %clang %cflags -gdwarf-5 main.o helper.o -o main.exe -fno-pic -no-pie8; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections --always-convert-to-ranges --debug-thread-count=4 --cu-processing-batch-size=49; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.exe | FileCheck -check-prefix=PRE-BOLT %s10; RUN: llvm-dwarfdump --show-form --verbose --debug-addr main.exe.bolt &> %t/foo.txt11; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.exe.bolt >> %t/foo.txt12; RUN: cat %t/foo.txt | FileCheck -check-prefix=BOLT %s13; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.dwo | FileCheck -check-prefix=PRE-BOLT-DWO-MAIN %s14; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.dwo.dwo | FileCheck -check-prefix=BOLT-DWO-MAIN %s15 16;; Testing dwarf5 mix of split dwarf and monolithic CUs.17 18; PRE-BOLT: version = 0x000519; PRE-BOLT: DW_TAG_skeleton_unit20; PRE-BOLT: DW_AT_low_pc [DW_FORM_addrx]21; PRE-BOLT-NEXT: DW_AT_high_pc [DW_FORM_data4]22; PRE-BOLT: DW_AT_addr_base [DW_FORM_sec_offset]  (0x00000008)23; PRE-BOLT: version = 0x000524; PRE-BOLT: DW_TAG_compile_unit25; PRE-BOLT: DW_AT_low_pc [DW_FORM_addrx]  (indexed (00000002)26; PRE-BOLT-NEXT: DW_AT_high_pc [DW_FORM_data4] (0x0000003d)27; PRE-BOLT-NEXT: DW_AT_addr_base [DW_FORM_sec_offset]  (0x00000030)28 29; BOLT: Addrs: [30; BOLT-NEXT: 0x31; BOLT-NEXT: 0x32; BOLT-NEXT: 0x[[#%.16x,ADDR:]]33; BOLT-NEXT: 0x[[#%.16x,ADDR2:]]34; BOLT: Addrs: [35; BOLT-NEXT: 0x[[#%.16x,ADDR3:]]36; BOLT: DW_TAG_skeleton_unit37; BOLT: DW_AT_dwo_name [DW_FORM_strx1]  (indexed (00000001) string = "main.dwo.dwo")38; BOLT-NEXT: DW_AT_low_pc [DW_FORM_addrx]	(indexed (00000004) address = 0x0000000000000000)39; BOLT-NEXT: DW_AT_ranges [DW_FORM_rnglistx] (indexed (0x0) rangelist = 0x0000001040; BOLT-NEXT: [0x[[#ADDR]]41; BOLT-SAME: 0x[[#ADDR + 0x24]]42; BOLT-NEXT: [0x[[#ADDR2]]43; BOLT-SAME: 0x[[#ADDR2 + 0x59]]44; BOLT-NEXT: DW_AT_addr_base [DW_FORM_sec_offset]  (0x00000008)45; BOLT-NEXT: DW_AT_rnglists_base [DW_FORM_sec_offset]  (0x0000000c)46; BOLT: DW_TAG_compile_unit47; BOLT: DW_AT_name [DW_FORM_strx1]  (indexed (00000001) string = "helper.cpp")48; BOLT: DW_AT_low_pc [DW_FORM_addrx]	(indexed (00000001) address = 0x0000000000000000)49; BOLT-NEXT: DW_AT_ranges [DW_FORM_rnglistx] (indexed (0x0) rangelist = 0x0000002e50; BOLT-NEXT: [0x[[#ADDR3]]51; BOLT-SAME: 0x[[#ADDR3 + 0x3D]]52; BOLT-NEXT: DW_AT_addr_base [DW_FORM_sec_offset]  (0x00000038)53; BOLT-NEXT: DW_AT_rnglists_base [DW_FORM_sec_offset]  (0x00000026)54; BOLT: DW_TAG_variable55; BOLT-NEXT: DW_AT_name [DW_FORM_strx1]  (indexed (00000003) string = "z")56; BOLT-NEXT: DW_AT_type57; BOLT-NEXT: DW_AT_external58; BOLT-NEXT: DW_AT_decl_file59; BOLT-NEXT: DW_AT_decl_line60; BOLT-NEXT: DW_AT_location [DW_FORM_exprloc]  (DW_OP_addrx 0x2)61; BOLT: DW_TAG_variable62; BOLT-NEXT: DW_AT_name [DW_FORM_strx1]  (indexed (00000005) string = "d")63; BOLT-NEXT: DW_AT_type64; BOLT-NEXT: DW_AT_external65; BOLT-NEXT: DW_AT_decl_file66; BOLT-NEXT: DW_AT_decl_line67; BOLT-NEXT: DW_AT_location [DW_FORM_exprloc]  (DW_OP_addrx 0x3)68; BOLT: DW_TAG_subprogram69; BOLT-NEXT: DW_AT_ranges [DW_FORM_rnglistx] (indexed (0x1) rangelist = 0x0000003270; BOLT-NEXT: [0x[[#ADDR3]]71; BOLT-SAME: 0x[[#ADDR3 + 0x3D]]72 73; PRE-BOLT-DWO-MAIN: version = 0x000574; PRE-BOLT-DWO-MAIN: DW_TAG_compile_unit75; PRE-BOLT-DWO-MAIN: DW_TAG_variable [2]76; PRE-BOLT-DWO-MAIN-NEXT: DW_AT_name [DW_FORM_strx1]	(indexed (00000000) string = "x")77; PRE-BOLT-DWO-MAIN-NEXT: DW_AT_type78; PRE-BOLT-DWO-MAIN-NEXT: DW_AT_external79; PRE-BOLT-DWO-MAIN-NEXT: DW_AT_decl_file80; PRE-BOLT-DWO-MAIN-NEXT: DW_AT_decl_line81; PRE-BOLT-DWO-MAIN-NEXT: DW_AT_location [DW_FORM_exprloc]	(DW_OP_addrx 0x0)82; PRE-BOLT-DWO-MAIN: DW_TAG_variable [2]83; PRE-BOLT-DWO-MAIN-NEXT: DW_AT_name [DW_FORM_strx1]	(indexed (00000002) string = "y")84; PRE-BOLT-DWO-MAIN-NEXT: DW_AT_type85; PRE-BOLT-DWO-MAIN-NEXT: DW_AT_external86; PRE-BOLT-DWO-MAIN-NEXT: DW_AT_decl_file87; PRE-BOLT-DWO-MAIN-NEXT: DW_AT_decl_line88; PRE-BOLT-DWO-MAIN-NEXT: DW_AT_location [DW_FORM_exprloc]	(DW_OP_addrx 0x1)89; PRE-BOLT-DWO-MAIN: DW_TAG_subprogram90; PRE-BOLT-DWO-MAIN-NEXT: DW_AT_low_pc [DW_FORM_addrx]	(indexed (00000002)91; PRE-BOLT-DWO-MAIN-NEXT: DW_AT_high_pc [DW_FORM_data4]	(0x00000024)92; PRE-BOLT-DWO-MAIN-NEXT: DW_AT_frame_base93; PRE-BOLT-DWO-MAIN-NEXT: DW_AT_linkage_name [DW_FORM_strx1]	(indexed (00000003) string = "_Z3usePiS_")94; PRE-BOLT-DWO-MAIN-NEXT: DW_AT_name [DW_FORM_strx1]	(indexed (00000004) string = "use")95; PRE-BOLT-DWO-MAIN: DW_TAG_subprogram96; PRE-BOLT-DWO-MAIN-NEXT: DW_AT_low_pc [DW_FORM_addrx]	(indexed (00000003)97; PRE-BOLT-DWO-MAIN-NEXT: DW_AT_high_pc [DW_FORM_data4]	(0x0000005f)98; PRE-BOLT-DWO-MAIN-NEXT: DW_AT_frame_base99; PRE-BOLT-DWO-MAIN-NEXT: DW_AT_name [DW_FORM_strx1]	(indexed (00000005) string = "main")100 101; BOLT-DWO-MAIN: DW_TAG_compile_unit102; BOLT-DWO-MAIN: DW_TAG_variable [2]103; BOLT-DWO-MAIN-NEXT: DW_AT_name [DW_FORM_strx1]	(indexed (00000000) string = "x")104; BOLT-DWO-MAIN-NEXT: DW_AT_type105; BOLT-DWO-MAIN-NEXT: DW_AT_external106; BOLT-DWO-MAIN-NEXT: DW_AT_decl_file107; BOLT-DWO-MAIN-NEXT: DW_AT_decl_line108; BOLT-DWO-MAIN-NEXT: DW_AT_location [DW_FORM_exprloc]	(DW_OP_addrx 0x0)109; BOLT-DWO-MAIN: DW_TAG_variable [2]110; BOLT-DWO-MAIN-NEXT: DW_AT_name [DW_FORM_strx1]	(indexed (00000002) string = "y")111; BOLT-DWO-MAIN-NEXT: DW_AT_type112; BOLT-DWO-MAIN-NEXT: DW_AT_external113; BOLT-DWO-MAIN-NEXT: DW_AT_decl_file114; BOLT-DWO-MAIN-NEXT: DW_AT_decl_line115; BOLT-DWO-MAIN-NEXT: DW_AT_location [DW_FORM_exprloc]	(DW_OP_addrx 0x1)116; BOLT-DWO-MAIN: DW_TAG_subprogram [4]117; BOLT-DWO-MAIN-NEXT: DW_AT_ranges [DW_FORM_rnglistx]	(indexed (0x0) rangelist = 0x00000014118; BOLT-DWO-MAIN-NEXT: [0x0000000000000000, 0x0000000000000024))119; BOLT-DWO-MAIN-NEXT: DW_AT_frame_base120; BOLT-DWO-MAIN-NEXT: DW_AT_linkage_name [DW_FORM_strx1]	(indexed (00000003) string = "_Z3usePiS_")121; BOLT-DWO-MAIN-NEXT: DW_AT_name [DW_FORM_strx1]	(indexed (00000004) string = "use")122; BOLT-DWO-MAIN: DW_TAG_subprogram [6]123; BOLT-DWO-MAIN-NEXT: DW_AT_ranges [DW_FORM_rnglistx]	(indexed (0x1) rangelist = 0x00000018124; BOLT-DWO-MAIN-NEXT: [0x0000000000000000, 0x0000000000000059))125; BOLT-DWO-MAIN-NEXT: DW_AT_frame_base [DW_FORM_exprloc]	(DW_OP_reg6 RBP)126; BOLT-DWO-MAIN-NEXT: DW_AT_name [DW_FORM_strx1]	(indexed (00000005) string = "main")127