473,396 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

Nov 14 '05 #1
0 1617

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Linus Nikander | last post by:
After trying to manually reverse-engineer a piece of code i've been handed using Visio I figure someone must have developed a tool that can do automatically in 5 minutes what took me 2 hours. ...
2
by: Ken | last post by:
I would like to start using EventLogTraceListener, and am running into a couple of significant limitations: 1) I have found that there is no way to write EventLog entries with different...
2
by: peter | last post by:
Is there any IDE supporting javascript debugging?
3
by: Thomas Glanzmann | last post by:
Hello, I am looking for a tool like strace or ltrace that accounts every 'call' on x86 executables. Maybe has valgrind such a option? Thomas
19
by: lihua | last post by:
Hi, Group! I got one question here: We all know that fclose() must be called after file operations to avoid unexpected errors.But there are really cases when you forget to do that!Just like...
1
by: toton | last post by:
Hi, Is there any tool for template debugging, during compilation process ? Just like gdb or visual studio debugger do it during program execution, a step by step debug for the program, I am...
16
by: Prayag Narula | last post by:
Hi, I want to redefine fprintf for debugging purposes. That is I want that all the output that is going to the stdout should be logged in a file. I tried something like #define fprintf...
0
jwwicks
by: jwwicks | last post by:
Introduction This tutorial describes how to use Visual Studio to create a new C++ program, compile/run a program, resume work on an existing program and debug a program. It is aimed at the...
2
jwwicks
by: jwwicks | last post by:
C/C++ Programs and Debugging in Linux This tutorial will give you a basic idea how to debug a program in Linux using GDB. As you are aware Visual Studio doesn’t run on Linux so you have to use...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.