[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 165
  • Last Modified:

Tracing Utility

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
jwilcox
Asked:
jwilcox
  • 2
1 Solution
 
braveheartCommented:
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
 
elfieCommented:
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
 
ahoffmannCommented:
As braveheart and elfie said, Purify could find such "strange behaviors" it also allows to trace your code.
0
 
braveheartCommented:
Use Purify - it isn't shareware but it is very good and not too expensive.
0

Featured Post

Evaluating UTMs? Here's what you need to know!

Evaluating a UTM appliance and vendor can prove to be an overwhelming exercise.  How can you make sure that you're getting the security that your organization needs without breaking the bank? Check out our UTM Buyer's Guide for more information on what you should be looking for!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now