commit afacfdb236d896f7c0f307322f03695701c131e9
parent d53d0f8403906e49d3a8883f77fb9445bb0128b4
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Fri, 18 Sep 2020 17:31:53 +0200
os9: Get context as soon as possible
Delaying getting the context makes that it is more
different from the actual point where panic() was
called.
Change-Id: I611d2855c24a532c7eeb13a826a954cb6a2d67ed
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/os9/panic.c b/src/os9/panic.c
@@ -83,8 +83,8 @@ panic(const char *msg)
if (first) {
first = 0;
- kprint(kerr, "panic: %s\n", msg);
getcontext(&ctx);
+ kprint(kerr, "panic: %s\n", msg);
dumpregs(&ctx, kerr);
backtrace(&ctx);
dumpstack(&ctx);