libc: core: print error message on assertion failure
This commit is contained in:
@@ -7,3 +7,6 @@
|
|||||||
[submodule "lib/libfx"]
|
[submodule "lib/libfx"]
|
||||||
path = lib/libfx
|
path = lib/libfx
|
||||||
url = https://g.wash.red/wash/fx.git
|
url = https://g.wash.red/wash/fx.git
|
||||||
|
[submodule "programs/bshell"]
|
||||||
|
path = programs/bshell
|
||||||
|
url = https://g.wash.red/wash/bshell.git
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#include <magenta/log.h>
|
||||||
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
extern void __libc_assert_failed(
|
extern void __libc_assert_failed(
|
||||||
@@ -6,5 +8,6 @@ extern void __libc_assert_failed(
|
|||||||
const char *func,
|
const char *func,
|
||||||
const char *cond)
|
const char *cond)
|
||||||
{
|
{
|
||||||
|
kern_logf("ASSERT: %s failed (%s in %s:%d)", cond, func, file, line);
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|||||||
Submodule
+1
Submodule programs/bshell added at 1a311b3796
Reference in New Issue
Block a user