TheRonin
11th July 2007, 08:41
I'm trying to create a framework for producing a stacktrace when an exception gets thrown in c++ (gcc 3.3)
I've found that glibc (the GNU C library) has something called backtrace and am wondering how it compares to gcc's unwind facility. Using _Unwind_Backtrace i can traverse the stack and get a bunch of instruction pointers, but no more context than that. I was hoping to be able to get file name and line number...maybe even method and class name.
Also, i've found some example code that uses _Unwind_Backtrace but that also checks if the gcc version is >=3.4...so i'm also wondering if there's any difference in unwind's behavior between gcc 3.3 and 3.4?
This is a very specific and niched question and i'm not really expecting a wealth of response...i don't really know where else to turn. :confused:
thanks in advance!
I've found that glibc (the GNU C library) has something called backtrace and am wondering how it compares to gcc's unwind facility. Using _Unwind_Backtrace i can traverse the stack and get a bunch of instruction pointers, but no more context than that. I was hoping to be able to get file name and line number...maybe even method and class name.
Also, i've found some example code that uses _Unwind_Backtrace but that also checks if the gcc version is >=3.4...so i'm also wondering if there's any difference in unwind's behavior between gcc 3.3 and 3.4?
This is a very specific and niched question and i'm not really expecting a wealth of response...i don't really know where else to turn. :confused:
thanks in advance!