<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Ryan Joseph via fpc-pascal <<a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>> schrieb am Mi., 20. Nov. 2019, 04:36:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I came across get_caller_frame in some unrelated code and I was just curious about this so I wanted to ask.<br>
<br>
What does get_caller_frame return exactly? Is this a pointer to a stack frame that could be copied to the heap? I'm still interested in how we could add some form of coroutine like behaviors to pascal and so I was wondering if we could copy/restore the current stack pointer so that SetJmp and LongJmp would not blow things up.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">It returns the address of the caller's frame pointer. See also <a href="https://www.freepascal.org/docs-html/rtl/system/get_caller_frame.html">https://www.freepascal.org/docs-html/rtl/system/get_caller_frame.html</a></div><div dir="auto"><br></div><div dir="auto">It's mainly used in context of raising exceptions with the help of a second function. See here: <a href="https://freepascal.org/docs-html/current/ref/refse112.html#x227-24900017.1">https://freepascal.org/docs-html/current/ref/refse112.html#x227-24900017.1</a></div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>