Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!calvin!badri From: badri@calvin.scs.com (Badri Lokanathan) Newsgroups: comp.unix.questions Subject: Usage of ptrace Message-ID: <118@calvin.scs.com> Date: 9 Jan 90 15:47:41 GMT Reply-To: badri@scsfs7.UUCP () Distribution: usa Organization: Silicon Compiler Systems / Warren NJ Lines: 13 I want to write some code that prints out the call stack on demand (eg during a segmentation fault.) The goal is to achieve something similar to the "trace" command on a sun (which is limited to system calls only,) except that I require user-defined functions as well. Is it possible to use ptrace to do this? Could someone mail me a snippet of code to show me how? Thanks. -- ,------------------------. "O! the beautiful bombs falling! | Badri Lokanathan | Children leap as deer to catch them. | sdl!badri@uunet.uu.net | Mothers burst open like flowers. `------------------------' Fathers spin away into orange air." -Dick Bakken