[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] How to get a backtrace from saved frame pointer
From: |
Roman Tsisyk |
Subject: |
[Libunwind-devel] How to get a backtrace from saved frame pointer |
Date: |
Sun, 05 Feb 2017 09:52:39 +0300 |
Hi!
My application uses lightweight user-space threads (fibers a.k.a coroutines).
Each fiber has its own stack and a saved frame pointer to the last executed
function, retrieved from `__builtin_frame_address(0)`. I want to create
backtraces for all fibers using saved frame pointers.
Currently this feature is implemented using libbfd[1], which is non-portable
and just terrible. I want to switch to libunwind, but I don't understand how to
wrap unw_create_addr_space()/unw_init_remote() for my case. Could you please
provide some examples?
[1]:
https://github.com/tarantool/tarantool/blob/3379dbcc04e048a5dd1a61b5fa7caacb66598120/src/backtrace.cc#L294-L329
--
WBR,
Roman Tsisyk <address@hidden>
http://tarantool.org/ - an efficient in-memory data store and a Lua
application server
- [Libunwind-devel] How to get a backtrace from saved frame pointer,
Roman Tsisyk <=