Created
March 10, 2024 09:50
-
-
Save mintsoft/9092fcfdf4d0f569b7170e41f00c1894 to your computer and use it in GitHub Desktop.
qCritical log out a stack trace from boost::stacktrace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <boost/stacktrace.hpp> | |
// ..... | |
auto re_stacktrace = boost::stacktrace::stacktrace(); | |
for(boost::stacktrace::frame frame: re_stacktrace) { | |
if(frame.empty() == false) { | |
qCritical("STACK -- %s %s:%d %d", frame.name().c_str(), frame.source_file().c_str(), frame.source_line(), frame.address()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment