Hi, all:
I got a problem while wants to trace some information on program catches exceptions.
I used the function below:
extern "C" void log_backtrace()
{
// Dump the callstack
int callstack[128];
int frames = backtrace((void**) callstack, 128);
char** strs = backtrace_symbols((void**) callstack, frames);
for (int i = 1; i < frames; ++i)
{
char functionSymbol[64*1024];
char moduleName [64*1024];
int offset = 0;
sscanf(strs[i], "%*d %s %*s %s %*s %d", &moduleName,
&functionSymbol, &offset);