[fpc-pascal] get_caller_frame

Sven Barth pascaldragon at googlemail.com
Fri Nov 22 07:56:58 CET 2019


Ryan Joseph via fpc-pascal <fpc-pascal at lists.freepascal.org> schrieb am
Fr., 22. Nov. 2019, 01:51:

>
>
> > On Nov 21, 2019, at 1:41 AM, Sven Barth via fpc-pascal <
> fpc-pascal at lists.freepascal.org> wrote:
> >
> > No. On x86 it's essentially the content of the EBP/RBP register which is
> (assuming no optimizations are done) essentially the ESP/RSP register of
> the calling function. This is only used by the exception handling to have
> the exception appear to be raised somewhere else.
>
> So what's missing then to be able make saving a stack frame to the heap
> and then restoring it?
>

That the compiler doesn't throw a wrench in your plans and decides to use
EBP/RBP for its own purposes due to optimization? Not to mention that on
other platforms this will likely be completely different?

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20191122/63e929a9/attachment.html>


More information about the fpc-pascal mailing list