2016-12-15 3:27 GMT+03:00 Vladimir Batov
On 12/15/2016 06:01 AM, Antony Polukhin wrote:
... Please, take a quick look at the Linux implementation
https://github.com/apolukhin/stacktrace/blob/master/include/boost/stacktrace... If your implementation has a more advanced technique for detecting source file/line - I'd really appreciate a hint.
My version is nowhere advanced... I humbly use the facilities provided by backtrace(), backtrace_symbols() and abi::__cxa_demangle() (GNU extensions). Then, while traversing the array returned by backtrace_symbols(), I skip the very first entry. For advanced you might probably like to have a look at the backtrace(), backtrace_symbols() source code.
I did that... and that code was not async-signal-safe and was not extracting information from debug sections :( -- Best regards, Antony Polukhin