Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!brunix!m2jhc!jhc From: jhc@m2jhc.uucp (James H. Coombs) Newsgroups: comp.lang.c++ Subject: automatic tracing of function entry/exit Message-ID: <52352@brunix.UUCP> Date: 6 Oct 90 20:16:39 GMT Sender: news@brunix.UUCP Reply-To: jhc@iris.brown.edu Distribution: na Organization: IRIS - Brown University Lines: 20 Has anyone come up with a way to automatically trace function entries and exits? We have a convention of wrapping our functions in hand coded macros, e.g.: Object::Print() { TRACEIN("Object::Print"); .... TRACEOUT("Object::Print"); } This gives us a simple way of viewing the execution of a program, and it works even when adb is confused. But, it would be much better to provide such tracing automatically. I could write a filter to pre-process the source, but I am hoping to find a better approach. I also would like to avoid asking developers to wrap their function definitions in macro invocations. Thanks for any ideas. --Jim