Make note about frame pointer

This commit is contained in:
rtldg 2025-03-03 00:56:42 +00:00
parent 4a8b72bdf4
commit d2b821e9d1

View File

@ -1488,8 +1488,8 @@ namespace SourceHook
MSVC_ONLY(m_PubFunc.sub(rsp, 0x38)); // Shadow space 32 bytes + 2 * 8 bytes (for our parameters) + 8 bytes
// TODO: GCC_ONLY(m_PubFunc.sub(rsp, 8+?));
// Unnecessary according to AMD manual (Section 3.2.2 The Stack Frame)
// but GCC still does it anyways, so let's do it as well
// Frame pointer! We like working callstacks when debugging crashes!
// TODO: Might mean we don't have to `sub rsp, 8`?
GCC_ONLY(m_PubFunc.push(rbp));
GCC_ONLY(m_PubFunc.mov(rbp, rsp));