Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C Programming (http://www.velocityreviews.com/forums/f42-c-programming.html)
-   -   Debugging tool: Trace function calls + variable usage automatically (http://www.velocityreviews.com/forums/t434321-debugging-tool-trace-function-calls-variable-usage-automatically.html)

Joerg Schoen 06-28-2004 08:23 PM

Debugging tool: Trace function calls + variable usage automatically
 
Hi folks!

"JSCPP" is a ANSI-C preprocessor and language parser. It can analyze or
instrument C-code. The most prominent application currently is to add
function trace calls to existing C programs simply by recompiling it.

The tracing will show when functions are entered or left along with the
arguments. Default is to trace EVERY function, but fine-grained control is
possible through a custom header file.

Additionally, one can trace how variables are changed or accessed.

The program has been used successfully on large projects and can be helpful
to detect errors.

The program can emit the original sources after instrumenting them instead
of the preprocessed sources. So it can be used to permanently add trace
calls to C coding.

Other ideas are to separate large and bloated functions into smaller ones as
follows: prefix a large block by a certain pragma and run the code through
jscpp. It will analyze the dependencies between the block and the
surrounding subroutine (i. e. variables used/altered) and move the block to
a separate subroutine, creating an appropriate function call.

Documentation and example programs are included. You find the tarball under
http://home.t-online.de/home/JoergSi...n/prg/prg.html



All times are GMT. The time now is 09:24 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.