12/12 This may sound wierd but is there a way for a program compiled
with the -g debugging option to examine its own stack frame?
I once ran a program that, whenever it crashed, did an automatic
backtrace on itself and dumped it to stderr.
\_ ~mconst/src/gdbcall will let your program run gdb commands
(like "backtrace") on itself. --mconst
\_ another toy, that helped destroy, the elder race of man.
\_ You can do this in assembly, catch an exception and simply
check your stack register and walk all the way up
\_ How about catching SIGBUS, dumping core and then running gdb
backtrace on the resulting core file. |