Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Debugging tool: Trace function calls + variable usage automatically

Reply
Thread Tools

Debugging tool: Trace function calls + variable usage automatically

 
 
Joerg Schoen
Guest
Posts: n/a
 
      06-28-2004
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How to trace function calls? user923005 C Programming 1 05-31-2008 04:35 PM
This function has an onClick event that calls a function that calls This function Bob Javascript 5 10-24-2006 04:11 PM
trace function calls to get signatures harold fellermann Python 0 07-02-2005 02:41 PM
Tool to trace function calls Thomas Glanzmann C Programming 3 06-28-2005 11:46 PM
trace sub's calls stack to STDERR (for cgi debugging) henq Perl Misc 1 01-02-2004 01:10 AM



Advertisments