[PATCH] D139663: Emit unwind information in the .debug_frame section when the .cfi_sections .debug_frame directive is used.
Shubham Sandeep Rastogi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 8 15:34:57 PST 2022
rastogishubham updated this revision to Diff 481465.
rastogishubham added a comment.
Addressed review feedback, reduced the test to not have any references to AArch63 registers and added a triple to the run line. Removed the extra IsDebugFrame bool and made the check for emission of debug frame information simpler
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139663/new/
https://reviews.llvm.org/D139663
Files:
llvm/lib/MC/MCDwarf.cpp
llvm/test/DebugInfo/debugframeinfo.s
Index: llvm/test/DebugInfo/debugframeinfo.s
===================================================================
--- /dev/null
+++ llvm/test/DebugInfo/debugframeinfo.s
@@ -0,0 +1,14 @@
+# RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin22.1.0 %s -o %t.o
+# RUN: llvm-dwarfdump -debug-frame %t.o | FileCheck %s
+
+# CHECK: .debug_frame contents:
+# CHECK-EMPTY:
+# CHECK-NEXT: 00000000 00000014 ffffffff CIE
+# CHECK: .eh_frame contents:
+# CHECK-EMPTY:
+
+ .cfi_startproc
+ .cfi_signal_frame
+ .cfi_def_cfa x28, 0x340
+ .cfi_endproc
+ .cfi_sections .debug_frame
Index: llvm/lib/MC/MCDwarf.cpp
===================================================================
--- llvm/lib/MC/MCDwarf.cpp
+++ llvm/lib/MC/MCDwarf.cpp
@@ -1860,7 +1860,7 @@
// Emit the compact unwind info if available.
bool NeedsEHFrameSection = !MOFI->getSupportsCompactUnwindWithoutEHFrame();
- if (IsEH && MOFI->getCompactUnwindSection()) {
+ if (MOFI->getCompactUnwindSection()) {
Streamer.generateCompactUnwindEncodings(MAB);
bool SectionEmitted = false;
for (const MCDwarfFrameInfo &Frame : FrameArray) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139663.481465.patch
Type: text/x-patch
Size: 1106 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221208/bce87168/attachment.bin>
More information about the llvm-commits
mailing list