- Stacktrace generation with failed asserts
This commit is contained in:
@@ -16,7 +16,16 @@
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
// =====================================================================================================================
|
||||
|
||||
void __assert_callback(const char*, const char*, int, const char*)
|
||||
{
|
||||
#include <cpptrace/cpptrace.hpp>
|
||||
|
||||
void __assert_callback(const char* expression, const char* file, int line, const char* function, const char* description)
|
||||
{
|
||||
// Skip
|
||||
// __assert_callback
|
||||
// __assert_impl
|
||||
printf("Assert failed: \"%s\" \n"
|
||||
"At %s:%d in %s \n"
|
||||
"Description: %s \n",
|
||||
expression, file, line, function, description);
|
||||
cpptrace::generate_trace(2).print();
|
||||
}
|
||||
Reference in New Issue
Block a user