15 Dec
2016
15 Dec
'16
12:27 a.m.
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.