Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!hao!husc6!cmcl2!brl-adm!umd5!cvl!elsie!ncifcrf!randy From: randy@ncifcrf.UUCP (The Computer Grue) Newsgroups: comp.unix.wizards Subject: Stack trace from inside a program . . . Message-ID: <151@ncifcrf.UUCP> Date: Wed, 28-Oct-87 06:27:32 EST Article-I.D.: ncifcrf.151 Posted: Wed Oct 28 06:27:32 1987 Date-Received: Tue, 3-Nov-87 07:25:23 EST Organization: NCI Supercomputer Center, Frederick, MD Lines: 20 Keywords: dbx 'where' C innards I have a question for the net: how would one go about writing a C function that would give you a stack trace of all calls to that function? Ie. about the same kind of output that you might get from doing a core dump at that point in the program and typing 'where' under dbx? I'd like to do this several times in a running image, so I don't want to actually cause the core dump. Any ideas? I'm running under Sun OS 3.4, but I would think that this kind of program could be used in outline on several different types of Unix systems. -- Randy -- Randy Smith @ NCI Supercomputer Facility c/o PRI, Inc. Phone: (301) 698-5660 PO Box B, Bldng. 430 Uucp: ...!uunet!mimsy!elsie!ncifcrf!randy Frederick, MD 21701 Arpa: elsie!ncifcrf!randy@mimsy.umd.edu