[PATCH] Emit DWARF3 call frame information when DWARF3+ debug info is requested
Oliver Stannard
oliver.stannard at arm.com
Wed Jun 18 02:56:25 PDT 2014
Comments to explain version numbers, code style changes
http://reviews.llvm.org/D4027
Files:
lib/MC/MCDwarf.cpp
Index: lib/MC/MCDwarf.cpp
===================================================================
--- lib/MC/MCDwarf.cpp
+++ lib/MC/MCDwarf.cpp
@@ -1270,6 +1270,8 @@
// Version
if (verboseAsm) streamer.AddComment("DW_CIE_VERSION");
+ // For DWARF2, we use CIE version 1
+ // For DWARF3+, we use CIE version 3
uint8_t CIEVersion = context.getDwarfVersion() <= 2 ? 1 : 3;
streamer.EmitIntValue(CIEVersion, 1);
@@ -1303,9 +1305,10 @@
assert(MRI->getRARegister() <= 255 &&
"DWARF 2 encodes return_address_register in one byte");
streamer.EmitIntValue(MRI->getDwarfRegNum(MRI->getRARegister(), true), 1);
- } else
+ } else {
streamer.EmitULEB128IntValue(
MRI->getDwarfRegNum(MRI->getRARegister(), true));
+ }
// Augmentation Data Length (optional)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4027.10540.patch
Type: text/x-patch
Size: 803 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140618/0f93ba14/attachment.bin>
More information about the llvm-commits
mailing list