Solved

Tracing Utility

Posted on 1998-05-19
4
155 Views
Last Modified: 2010-04-15
Hi,

Is there a utility for UNIX machines that acts like strace but will also show calls to your own functions, not just system calls? I have a program that works great inside GDB, but I take it out of the debugger, and suddenly a major system component starts acting strange, and I want to know where in the code this is happening, since the debuggeris of no use there.

         Jason
0
Comment
Question by:jwilcox
  • 2
4 Comments
 
LVL 3

Expert Comment

by:braveheart
ID: 1250834
It is always good practice to insert your own tracing code, at least at the beginning and end of all your functions, probably in macros, controlled by an appropriate compilation option.

For tracking array bounds errors, memory leaks, abuse of file descriptors and other such bugs, I recommend Purify. It is an essential tool for all serious code cutters.
0
 
LVL 3

Expert Comment

by:elfie
ID: 1250835
If you specify your OS, maybe someone can give hints towards some free/share ware products.

As bravehart mentioned Purify something *real-good*.

You can also try "profiling", if your compiler supports on your OS. (to be specified at compile time), and use prof, gprof afterwards(HPUX)
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1250836
As braveheart and elfie said, Purify could find such "strange behaviors" it also allows to trace your code.
0
 
LVL 3

Accepted Solution

by:
braveheart earned 50 total points
ID: 1250837
Use Purify - it isn't shareware but it is very good and not too expensive.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now