Debugging tool: Trace function calls + variable usage automatically
"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
|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.