mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 08:33:12 -05:00
Once an image has .ehmeta, an eh_frame_hdr version other than 1, an eh_frame_ptr encoding other than absptr or pcrel, a 64-bit record length, an eh_frame_ptr outside the image or a missing terminator now throw instead of returning the empty answer. The test queries a fixture DLL whose .ehmeta it can break, since the unwinder reads the same section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27 lines
624 B
C++
27 lines
624 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
|
|
struct alignas(4) UnwindFixtureHeader {
|
|
std::uint8_t version = 1;
|
|
std::uint8_t framePointerEncoding = 0x1b;
|
|
std::uint8_t countEncoding = 0x03;
|
|
std::uint8_t tableEncoding = 0x3b;
|
|
std::int32_t frames = 0;
|
|
std::uint32_t count = 0;
|
|
};
|
|
|
|
struct alignas(4) UnwindFixtureFrames {
|
|
std::uint32_t cieLength = 12;
|
|
std::uint32_t cieId = 0;
|
|
std::uint8_t cie[8] = {1, 0, 1, 0x78, 16, 0, 0, 0};
|
|
std::uint32_t terminator = 0;
|
|
};
|
|
|
|
struct UnwindFixture {
|
|
UnwindFixtureHeader header;
|
|
UnwindFixtureFrames frames;
|
|
};
|
|
|
|
extern "C" UnwindFixture* GetUnwindFixture();
|