Support generation of CFI in .debug_frame format.
.debug_frame section is almost identical to .eh_frame section.
There are only minor differences in the CIE and FDE headers.
The main difference is that .eh_frame is intended to be used
at runtime for exception handling and is therefore allocated
within the running program whereas .debug_frame is not.
This makes .debug_frame easier to remove using standard tools.
"objcopy --strip-debug" removes .debug_frame, but not .eh_frame.
(although objcopy can be still be forced to remove .eh_frame)
Similarly, we might want to separate the CFI to separate debug
file or include it as compressed .gnu_debugdata section.
It is more appropriate to use .debug_frame for this purpose.
Bug:20556771
Change-Id: I9d91a333b9fb37523fd6fafccfad89b21d2477af
diff --git a/compiler/dwarf/dwarf_constants.h b/compiler/dwarf/dwarf_constants.h
index 61a44cd..3b570e5 100644
--- a/compiler/dwarf/dwarf_constants.h
+++ b/compiler/dwarf/dwarf_constants.h
@@ -680,6 +680,14 @@
DW_EH_PE_aligned = 0x50,
};
+enum CFIFormat : uint8_t {
+ // This is the original format as defined by the specification.
+ // It is used for the .debug_frame section.
+ DW_DEBUG_FRAME_FORMAT,
+ // Slightly modified format used for the .eh_frame section.
+ DW_EH_FRAME_FORMAT
+};
+
} // namespace dwarf
} // namespace art