[PATCH] D139663: Emit unwind information in the .debug_frame section when the .cfi_sections .debug_frame directive is used.
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 8 14:56:47 PST 2022
aprantl added a comment.
Can you explain why this works?
It looks like you're effectively calling MCDwarfFrameemitter::Emit() twice with the exact same input (since it checks for `IsEH || IsDebugFrame`) if both flags are true?
================
Comment at: llvm/lib/MC/MCObjectStreamer.cpp:198
if (EmitDebugFrame)
- MCDwarfFrameEmitter::Emit(*this, MAB, false);
+ MCDwarfFrameEmitter::Emit(*this, MAB, false, true);
}
----------------
Why introduce two flags in Emit() if one is always the inverse of the other?
================
Comment at: llvm/test/DebugInfo/debugframeinfo.s:2
+# RUN: llvm-mc -filetype=obj %s -o %t.o
+# RUN: llvm-dwarfdump -debug-frame %t.o | FileCheck %s
+
----------------
You need to restrict this testcase to some specific architecture or check less specific things. For example, there are AArch64 register names in the CHECK output.
Generally, you just want to test that it is emitted at all, so checking just that any contents exists in the section should be enough, right?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139663/new/
https://reviews.llvm.org/D139663
More information about the llvm-commits
mailing list