Add support for only a .eh_frame.
Static executables only have a .eh_frame section and no .eh_frame_hdr
section. Add support for this by rearranging the class hierarchy and
creating a DwarfEhFrameWithHdr class and a DwarfEhFrame class to handle
the different cases.
Add new unit tests for DwarfEhFrame and for the new functionality.
Bug: 68820189
Test: Passes new unit tests, unwinds static executables.
Change-Id: I63d7cb8c52a686e96579a2266e18c0d06bbb6e63
diff --git a/libunwindstack/Android.bp b/libunwindstack/Android.bp
index c885c3f..40364fe 100644
--- a/libunwindstack/Android.bp
+++ b/libunwindstack/Android.bp
@@ -48,8 +48,7 @@
srcs: [
"ArmExidx.cpp",
"DwarfCfa.cpp",
- "DwarfDebugFrame.cpp",
- "DwarfEhFrame.cpp",
+ "DwarfEhFrameWithHdr.cpp",
"DwarfMemory.cpp",
"DwarfOp.cpp",
"DwarfSection.cpp",
@@ -106,6 +105,7 @@
"tests/DwarfCfaTest.cpp",
"tests/DwarfDebugFrameTest.cpp",
"tests/DwarfEhFrameTest.cpp",
+ "tests/DwarfEhFrameWithHdrTest.cpp",
"tests/DwarfMemoryTest.cpp",
"tests/DwarfOpLogTest.cpp",
"tests/DwarfOpTest.cpp",