I find it pretty annoying how often things are advertised as C++ but are Unix specific. As someone who ships Windows + OS X + Linux I'm pretty biased though.
libunwind is awesome. It uses the same information for its job that the actual compiler uses for unwinding exceptions in C++, etc (DWARF .eh_frame & co). It's also much more portable these days (I believe backtrace() is glibc-specific). There are also remote unwinding capabilities I want to play with
My biggest problem with "standard" libunwind is how slow it is compared to a whole loop against the registers (which of course isn't reliable with -fomit-frame-pointer). IIRC, the gcc's call to backtrace actually parses DWARF to work around this (and thus is super slow).
Yes backtrace() and friends is a glibc thing, but libexecinfo tries to be compatible and portable. Back when I used backtrace(), that was about the best there was, and it was not that great really. I'm glad I know about libunwind now thanks to this post.
Anyhow, there's pretty good support for stack traces on Win64. For 32 bit it's less good. https://msdn.microsoft.com/en-us/library/windows/desktop/ms6...