This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Function, file and line information out of '_Unwind_Context' ptr
- From: Gerrit Bruchhäuser<gbruchhaeuser at orga-systems dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 21 Jun 2004 12:28:17 +0200
- Subject: Function, file and line information out of '_Unwind_Context' ptr
Hi all,
how can I retreive a backtrace which includes function-name, file and
line information on Tr64-OSF-Alpha (glibc is not supported on this
platform).
Well, I tried:
---
#include <iostream>
#include <stdlib.h>
#include <unwind.h>
static _Unwind_Reason_Code
Trace_cb(struct _Unwind_Context *, void *)
{
std::cout << "Function: " << std::endl;
return _URC_CONTINUE_UNWIND;
}
void
foo()
{
_Unwind_Backtrace(Trace_cb, NULL);
}
int main()
{
foo();
return 0;
}
---
But I don't know how to reteive the information out of 'Unwind_Context'
pointer.
Any idea??
Many thanks,
Gerrit