Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!unisoft!hoptoad!dasys1!dlovell From: dlovell@dasys1.UUCP (Douglas Lovell) Newsgroups: comp.lang.c Subject: Re: C syntax question Keywords: C, syntax, compiler Message-ID: <9838@dasys1.UUCP> Date: 31 May 89 01:12:51 GMT References: <2747@buengc.BU.EDU> <207600022@s.cs.uiuc.edu> <821@clyde.Concordia.CA> <10305@smoke.BRL.MIL> Reply-To: dlovell@dasys1.UUCP (Douglas Lovell) Organization: The Big Electric Cat Lines: 32 >In article <821@clyde.Concordia.CA> marcap@concour.CS.Concordia.CA (Marc Pawlowsky) writes: >>I am looking for a public-domain trace utility for C. e.g. say when a >>statement is about to execute. ... I also want to know >>which sections of code have or have not been entered. I use some code written by Fred Fish called "debug." Statements are coded directly into the program and selectively compiled. They look like-- DBUG_ENTER("functionName"); DBUG_PRINT("keyword", ("printf format control string", varargs)); DBUG_RETURN(functionReturnValue); /* or DBUG_VOID_RETURN; */ These are macros which invoke the debug functions. They do nothing if DBUG_OFF is defined. DBUG_ENTER/DBUG_RETURN enable function entry and exit tracing. DBUG_PRINT only gets printed if "keyword" is in the keyword list. keywords, printing, tracing, etc. is controled with -# argument in the argument list when you run the program. There are other features. If this is what you're after, say so and I'll rustle it up. -- Douglas Lovell Big Electric Cat Public UNIX ..!cmcl2!hombre!dasys1!dlovell