gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gm2] frame and return address of functions


From: Gaius Mulley
Subject: [Gm2] frame and return address of functions
Date: 10 Jul 2008 11:54:39 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Hi,

these can now be obtained by the new builtin functions (frame_address
and return_address).  So for example the following code sets the
return address in 'a'.  The parameter indicates how many levels you
wish to go back up the call stack.


MODULE return ;

FROM SYSTEM IMPORT ADDRESS ;
FROM Builtins IMPORT return_address ;

PROCEDURE foo ;
VAR
   a: ADDRESS ;
BEGIN
   a := return_address (0)
END foo ;

BEGIN
   foo
END return.


regards,
Gaius




reply via email to

[Prev in Thread] Current Thread [Next in Thread]