The problem with them is that they can't be used safely in asynchronous signal handlers, for which non-reentrant functions are required.
According to boost, there isn't a safe way to get stacktrace that's portable. On the other hand, one was described in this blog. The downside is that on windows it relies on StackWalker. There may be better, more modern ways to achieve this that I missed.
Currently in DMLC core the utility for printing stacktrace (and demangling) are the following:
https://github.com/dmlc/dmlc-core/blob/ebcaa42d0b7271265e6a02ff468c6753a8fbecdb/include/dmlc/logging.h#L49-L96
The problem with them is that they can't be used safely in asynchronous signal handlers, for which non-reentrant functions are required.
According to boost, there isn't a safe way to get stacktrace that's portable. On the other hand, one was described in this blog. The downside is that on windows it relies on StackWalker. There may be better, more modern ways to achieve this that I missed.