[libunwind] Add more information to eh_frame_hdr version error
This makes it easier to find the offending ELF file.
Reviewed By: #libunwind, MaskRay
Differential Revision: https://reviews.llvm.org/D126841
GitOrigin-RevId: 13b8bfc51451fcfc00f3e3480abaf64b337a43d4
diff --git a/src/EHHeaderParser.hpp b/src/EHHeaderParser.hpp
index 9a38070..ed4317c 100644
--- a/src/EHHeaderParser.hpp
+++ b/src/EHHeaderParser.hpp
@@ -57,7 +57,8 @@
pint_t p = ehHdrStart;
uint8_t version = addressSpace.get8(p++);
if (version != 1) {
- _LIBUNWIND_LOG0("Unsupported .eh_frame_hdr version");
+ _LIBUNWIND_LOG("unsupported .eh_frame_hdr version: %" PRIu8 " at %" PRIx64,
+ version, static_cast<uint64_t>(ehHdrStart));
return false;
}