Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-spam!sri-unix!hplabs!hp-sdd!ncr-sd!bigbang!blia!billc From: billc@blia.BLI.COM (Bill Coffin) Newsgroups: comp.lang.c,comp.unix.wizards Subject: Re: who called a C routine - get it from the stack frame Message-ID: <1215@blia.BLI.COM> Date: Wed, 10-Dec-86 13:14:42 EST Article-I.D.: blia.1215 Posted: Wed Dec 10 13:14:42 1986 Date-Received: Sat, 13-Dec-86 21:39:58 EST References: <810@hropus.UUCP> <961@cuuxb.UUCP> <4660@mimsy.UUCP> Distribution: comp Organization: Britton Lee, Los Gatos, CA Lines: 12 Summary: address of caller Xref: mnetor comp.lang.c:346 comp.unix.wizards:331 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.