C syntax question

Douglas Lovell dlovell at dasys1.UUCP
Wed May 31 11:12:51 AEST 1989


>In article <821 at clyde.Concordia.CA> marcap at 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



More information about the Comp.lang.c mailing list