3 ms·
If you don't care about exotica like async or signal safety, and just need to see the callstack from arbitray points, this can do the job without C++23: https:
by PaulDavisThe1st 3y ago
If you don't care about exotica like async or signal safety, and just need to see the callstack from arbitray points, this can do the job without C++23:
https://github.com/Ardour/ardour/blob/master/libs/pbd/stacktrace.cc https://github.com/Ardour/ardour/blob/master/libs/pbd/stackt...
(2 different implementations, one for POSIX-y systems with the execinfo.h header, and one for Windows)
The demange() function is elsewhere.
- anarazel 3y agoIme the execinfo.h backtraces are unfortunately not that useful in practice, due to being unable to resolve symbol names of static functions. But FWIW, you can use it for async signals with the _fd variant.