Stack Trace?

Stack Trace?

Post by James_W_McKelv » Sun, 28 Jul 1996 04:00:00

Is there a function that I can call to do a stack trace from within a
program?  I need one for Solaris (and also OSF).

The only thing necessary for the triumph of good
is for evil men to do nothing.


1. Problems calling a gdb stack trace from inside the program thats being traced.

I'm trying to get my C program to stack trace itself using gdb.

Upon detecting an error my program does a

system("gdb -x configfile programname programPID > outputfile");

Where the configfile contains the lines:-


Now that works fine from a bash shell but all I get when my program
hits it is a frozen program that needs a Ctrl-C.

Whats going on? Can I use this technique to stack trace my program?

It is a multi-threaded (pthreads) program, compiled using -gstabs+ in
the compile line, with gcc 3.1.

I don't want to have to write my own stack tracing routines!



2. need help with interesting problem

3. Stack trace in C/C++

4. Mandrake 6.1 to 7.0 breaks kppp

5. t: Displaying stack trace without using sdb

6. Device driver for I/O card

7. stack trace

8. Redhat 5 and 3C900 Boomerang

9. Stack trace wanted

10. Stack trace - Multi threaded

11. Stack Trace dump in do_IRQ

12. getting stack trace from inside program?

13. stack trace?