- Stacktrace generation with failed asserts

This commit is contained in:
2025-07-05 14:22:59 -04:00
parent 0afaae72ac
commit a33bf5206f
22 changed files with 529 additions and 191 deletions

View File

@@ -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();
}