be an info table on top of the stack).
*/
- /*
- Here we setup the stack unwinding annotation necessary to allow
- debuggers to find their way back to the C stack.
-
- This is a bit fiddly as we assume the layout of the stack prepared
- for us by StgRun. Note that in most cases StgRun is written in assembler
- and therefore has no associated unwind information. For this reason we
- need to identify the platform stack pointer and return address values for
- the StgRun's caller.
- */
+ // See Note [Unwinding foreign exports on x86-64].
#if defined(x86_64_HOST_ARCH)
- // offset of 8 in MachSp value due to return address
- unwind MachSp = MachSp + RESERVED_C_STACK_BYTES + STG_RUN_STACK_FRAME_SIZE + 8,
- UnwindReturnReg = W_[MachSp + RESERVED_C_STACK_BYTES + STG_RUN_STACK_FRAME_SIZE];
+ unwind UnwindReturnReg = STG_RUN_JMP;
#else
// FIXME: Fill in for other platforms
- unwind MachSp = return,
- UnwindReturnReg = return;
+ unwind UnwindReturnReg = return;
#endif
Sp = Sp + SIZEOF_StgStopFrame - WDS(2);