Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Tracing Utility

Posted on 1998-05-19
4
Medium Priority
?
162 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 150 total points
ID: 1250837
Use Purify - it isn't shareware but it is very good and not too expensive.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

721 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