who called a C routine - get it from the stack frame

Bill Coffin billc at blia.BLI.COM
Thu Dec 11 04:14:42 AEST 1986


People have been talking about the caller's-address problem as if it were
machine-dependent or operating-system dependent.  Not so.  It is
a compiler-dependent problem.  I guarantee you that a compiler generating
different frame-handling code will break any scheme that gets the
functions' return address.  Further, any compiler that can emulate
a stack architecture and do reasonable frame handling will enable 
solution of the problem; we have solved this problem on VM/CMS -- a
non-stack architecture.  Getting the caller's address is dependent 
entirely on the code generated by the compiler.

<vanilla disclaimer>



More information about the Comp.unix.wizards mailing list