This looks exactly what I am looking for. Thanks for the reply.
Would you happen to know the name of the lib or include file so that I can google some information on this?
Regards, Ben.
Bud Davis wrote:
If you are using glibc, they have a mechanism for retreiving the call stack and printing out the information. Here is a portion of the info page:
Backtraces
==========
A "backtrace" is a list of the function calls that are currently
active in a thread. The usual way to inspect a backtrace of a program
is to use an external debugger such as gdb. However, sometimes it is
useful to obtain a backtrace programmatically from within a program,
e.g., for the purposes of logging or diagnostics.
Is this what you are looking for ?
regards, bud davis