-Thanks
There's no built-into-C facility to do this, but perhaps
you can find "test coverage" tools that run on the systems
that concern you. (Questions about how to use the tools should
be directed to forums about them or about their host systems;
they're not questions about the C language.)
--
Eric Sosman
eso...@ieee-dot-org.invalid
This is C++ code, but you can probably translate the idea to C:
http://www.codeproject.com/KB/cpp/cmtrace.aspx
I guess that for your environment, this is what you want:
http://www.tlug.org.za/wiki/index.php/Obtaining_a_stack_trace_in_C_upon_SIGSEGV
The C language doesn't define any way to do this. Try asking in
comp.sys.hp.hpux, comp.unix.programmer, or one of the Linux groups.
--
Keith Thompson (The_Other_Keith) ks...@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
If you are using gcc, look up the -p (and -pg) options. For other
systems see if there are useful profiling commands. This is all
system specific, and thus off-topic here.
--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
** Posted from http://www.teranews.com **
>I have a C binary which is built from numerous .c and .h source files.
>How can I trace through which functions are being called when I execute
>the binary? Ideally I'd like to just see the function names accessed.
If all else fails, you can run it under a debugger.
-- Richard
--
In the selection of the two characters immediately succeeding the numeral 9,
consideration shall be given to their replacement by the graphics 10 and 11 to
facilitate the adoption of the code in the sterling monetary area. (X3.4-1963)
Excuse me. Noone here uses debuggers.
It's simple. You'll needs 2 steps.
1. step:
tell the compiler to compile and bind the sources with bouded debug
information.
2. step:
You just starts the program under the control of a debug and tells the
debug what you want from it.
You can do much more now.
You can hold the program at each source line where an executeable
statement is.
You can let the debug show you the value of each variable in sight
when the execution of the debugee is frozen.
You can change the value of each variable in sight at this point too.
And many, many other things too.
The only hurde is: you have to learn how to control the debug.
--
Tschau/Bye
Herbert
Visit http://www.ecomstation.de the home of german eComStation
eComStation 1.2R Deutsch ist da!