brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.3 KiB · 6caf587 Raw
52 lines · plain
1# REQUIRES: system-linux2 3# RUN: rm -rf %t4# RUN: mkdir -p %t5# RUN: cd %t6# RUN: llvm-mc --split-dwarf-file=main.dwo   -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-split-gdb-index-types-main.s -o maingdb.o7# RUN: llvm-mc --split-dwarf-file=helper.dwo -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-split-gdb-index-types-helper.s -o helpergdb.o8# RUN: %clang %cflags maingdb.o helpergdb.o -o maingdb.exe -Wl,-q9# RUN: llvm-objcopy maingdb.exe --add-section=.gdb_index=%p/Inputs/dwarf4-split-gdb-index-types-v8.gdb-index10# RUN: llvm-bolt maingdb.exe -o maingdb.exe.bolt --update-debug-sections11# RUN: llvm-dwarfdump --gdb-index maingdb.exe.bolt | FileCheck --check-prefix=POSTCHECK %s12 13## Tests that BOLT correctly handles gdb-index generated by GDB with split-dwarf DWARF4.14 15# POSTCHECK:          Version = 816# POSTCHECK:          CU list offset = 0x18, has 2 entries17# POSTCHECK-NEXT:         0: Offset = 0x0, Length = 0x3418# POSTCHECK-NEXT:         1: Offset = 0x34, Length = 0x3419# POSTCHECK:          Types CU list offset = 0x38, has 4 entries20# POSTCHECK-NEXT:       0: offset = 0x0000004a, type_offset = 0x0000001e, type_signature = 0xb4580bc1535df1e421# POSTCHECK-NEXT:       1: offset = 0x00000000, type_offset = 0x0000001e, type_signature = 0x675d23e4f33235f222# POSTCHECK-NEXT:       2: offset = 0x0000004a, type_offset = 0x0000001e, type_signature = 0x49dc260088be7e5623# POSTCHECK-NEXT:       3: offset = 0x00000000, type_offset = 0x0000001e, type_signature = 0x104ec427d2ebea6f24# POSTCHECK:          Address area offset = 0x98, has 2 entries25# POSTCHECK-NEXT:         Low/High address = [0x[[#%.4x,ADDR:]],26# POSTCHECK-SAME:           0x[[#ADDR + 0x7a]]) (Size: 0x7a), CU id = 027# POSTCHECK-NEXT:         Low/High address = [0x[[#%.4x,ADDR1:]],28# POSTCHECK-SAME:           0x[[#ADDR1 + 0x8]]) (Size: 0x8), CU id = 129# POSTCHECK:          Symbol table offset = 0xc0, size = 1024, filled slots30# POSTCHECK-NEXT:       192: Name offset = 0x38, CU vector offset = 0x031# POSTCHECK-NEXT:         String name: Foo2, CU vector index: 032# POSTCHECK-NEXT:       193: Name offset = 0x3d, CU vector offset = 0x833# POSTCHECK-NEXT:         String name: Foo3, CU vector index: 134# POSTCHECK-NEXT:       489: Name offset = 0x42, CU vector offset = 0x1035# POSTCHECK-NEXT:         String name: main, CU vector index: 236# POSTCHECK-NEXT:       518: Name offset = 0x47, CU vector offset = 0x1837# POSTCHECK-NEXT:         String name: char, CU vector index: 338# POSTCHECK-NEXT:       560: Name offset = 0x4c, CU vector offset = 0x2039# POSTCHECK-NEXT:         String name: Foo2a, CU vector index: 440# POSTCHECK-NEXT:       634: Name offset = 0x52, CU vector offset = 0x2841# POSTCHECK-NEXT:         String name: Foo, CU vector index: 542# POSTCHECK-NEXT:       661: Name offset = 0x56, CU vector offset = 0x3043# POSTCHECK-NEXT:         String name: foo, CU vector index: 644# POSTCHECK-NEXT:       754: Name offset = 0x5a, CU vector offset = 0x1845# POSTCHECK-NEXT:         String name: int, CU vector index: 346# POSTCHECK:          Constant pool offset = 0x20c0, has 7 CU vectors47# POSTCHECK-NEXT:       0(0x0): 0x1000000348# POSTCHECK-NEXT:       1(0x8): 0x1000000549# POSTCHECK-NEXT:       2(0x10): 0x3000000050# POSTCHECK-NEXT:       3(0x18): 0x9000000051# POSTCHECK-NEXT:       4(0x20): 0x1000000452