[llvm] 61f8597 - [DebugInfo] Add a test for dumping DWARF64 CIEs and FDEs (8/8).
Igor Kudrin via llvm-commits
llvm-commits at lists.llvm.org
Mon May 18 23:40:11 PDT 2020
Author: Igor Kudrin
Date: 2020-05-19T13:36:07+07:00
New Revision: 61f859785f6ff3d4c74436570d246da8bbec8664
URL: https://github.com/llvm/llvm-project/commit/61f859785f6ff3d4c74436570d246da8bbec8664
DIFF: https://github.com/llvm/llvm-project/commit/61f859785f6ff3d4c74436570d246da8bbec8664.diff
LOG: [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
Added:
llvm/test/DebugInfo/X86/debug-frame-dwarf64.s
Modified:
Removed:
################################################################################
diff --git a/llvm/test/DebugInfo/X86/debug-frame-dwarf64.s b/llvm/test/DebugInfo/X86/debug-frame-dwarf64.s
new file mode 100644
index 000000000000..e9820c58c46f
--- /dev/null
+++ b/llvm/test/DebugInfo/X86/debug-frame-dwarf64.s
@@ -0,0 +1,40 @@
+# RUN: llvm-mc -triple x86_64 %s -filetype=obj -o - | \
+# RUN: llvm-dwarfdump -debug-frame - | \
+# RUN: FileCheck %s
+
+# CHECK: 00000000 0000000000000010 ffffffffffffffff CIE
+# CHECK-NEXT: Version: 4
+# CHECK-NEXT: Augmentation: ""
+# CHECK-NEXT: Address size: 8
+# CHECK-NEXT: Segment desc size: 0
+# CHECK-NEXT: Code alignment factor: 1
+# CHECK-NEXT: Data alignment factor: -8
+# CHECK-NEXT: Return address column: 16
+# CHECK-EMPTY:
+# CHECK-NEXT: DW_CFA_nop:
+
+# CHECK: 0000001c 0000000000000018 0000000000000000 FDE cie=00000000 pc=00112233...00122233
+
+ .section .debug_frame, "", @progbits
+.LCIE:
+ .long 0xffffffff # DWARF64 mark
+ .quad .LCIEend-.LCIEid # Length
+.LCIEid:
+ .quad 0xffffffffffffffff # CIE id
+ .byte 4 # Version
+ .asciz "" # Augmentation
+ .byte 8 # Address size
+ .byte 0 # Segment selector size
+ .uleb128 1 # Code alignment factor
+ .sleb128 -8 # Data alignment factor
+ .uleb128 16 # Return address register
+ .byte 0 # DW_CFA_nop
+.LCIEend:
+.LFDE:
+ .long 0xffffffff # DWARF64 mark
+ .quad .LFDEend-.LFDEcieptr # Length
+.LFDEcieptr:
+ .quad .LCIE-.debug_frame # CIE pointer
+ .quad 0x00112233 # Initial location
+ .quad 0x00010000 # Address range
+.LFDEend:
More information about the llvm-commits
mailing list