[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
This commit is contained in:
Florian Mayer 2022-06-01 16:43:59 -07:00
parent 4463bd0f89
commit 13b8bfc514
1 changed files with 2 additions and 1 deletions

View File

@ -57,7 +57,8 @@ bool EHHeaderParser<A>::decodeEHHdr(A &addressSpace, pint_t ehHdrStart,
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;
}