Skip to content

Commit 61f8597

Browse files
committed
[DebugInfo] Add a test for dumping DWARF64 CIEs and FDEs (8/8).
This adds a test to check that Length and CIE_id/CIE_pointer fields in .debug_frame section are printed as 16-digit hex values if the records are in the DWARF64 format. Differential Revision: https://reviews.llvm.org/D79997
1 parent e94382e commit 61f8597

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# RUN: llvm-mc -triple x86_64 %s -filetype=obj -o - | \
2+
# RUN: llvm-dwarfdump -debug-frame - | \
3+
# RUN: FileCheck %s
4+
5+
# CHECK: 00000000 0000000000000010 ffffffffffffffff CIE
6+
# CHECK-NEXT: Version: 4
7+
# CHECK-NEXT: Augmentation: ""
8+
# CHECK-NEXT: Address size: 8
9+
# CHECK-NEXT: Segment desc size: 0
10+
# CHECK-NEXT: Code alignment factor: 1
11+
# CHECK-NEXT: Data alignment factor: -8
12+
# CHECK-NEXT: Return address column: 16
13+
# CHECK-EMPTY:
14+
# CHECK-NEXT: DW_CFA_nop:
15+
16+
# CHECK: 0000001c 0000000000000018 0000000000000000 FDE cie=00000000 pc=00112233...00122233
17+
18+
.section .debug_frame, "", @progbits
19+
.LCIE:
20+
.long 0xffffffff # DWARF64 mark
21+
.quad .LCIEend-.LCIEid # Length
22+
.LCIEid:
23+
.quad 0xffffffffffffffff # CIE id
24+
.byte 4 # Version
25+
.asciz "" # Augmentation
26+
.byte 8 # Address size
27+
.byte 0 # Segment selector size
28+
.uleb128 1 # Code alignment factor
29+
.sleb128 -8 # Data alignment factor
30+
.uleb128 16 # Return address register
31+
.byte 0 # DW_CFA_nop
32+
.LCIEend:
33+
.LFDE:
34+
.long 0xffffffff # DWARF64 mark
35+
.quad .LFDEend-.LFDEcieptr # Length
36+
.LFDEcieptr:
37+
.quad .LCIE-.debug_frame # CIE pointer
38+
.quad 0x00112233 # Initial location
39+
.quad 0x00010000 # Address range
40+
.LFDEend:

0 commit comments

Comments
 (0)