This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]