1
0
mirror of https://gitlab.os-k.eu/os-k-team/kvisc.git synced 2023-08-25 14:05:46 +02:00
kvisc/pc/except.c

28 lines
451 B
C
Raw Normal View History

2019-05-16 21:42:23 +02:00
// The OS/K Team licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#include "arch.h"
void _except(ctx_t *ctx, int code, char *fmt, ...)
{
va_list ap;
log("\nException %d - ", code);
2019-05-30 12:44:56 +02:00
2019-05-16 21:42:23 +02:00
va_start(ap, fmt);
vlog(fmt, ap);
va_end(ap);
2019-05-30 12:44:56 +02:00
2019-05-16 21:42:23 +02:00
log("\n");
dumpregs(ctx);
2019-05-30 13:25:30 +02:00
log("\n");
2019-05-16 21:42:23 +02:00
dumpfwstack(ctx);
if (ctx->mp)
free(ctx->mp);
2019-05-29 16:57:22 +02:00
exit(code);
2019-05-16 21:42:23 +02:00
}