1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-23 04:12:02 +00:00

fatal: Display start instead of bt if size = 0

This commit is contained in:
Michael Scire 2018-11-13 18:11:08 -08:00
parent fa9d7f40fc
commit d4ee772714

View file

@ -264,6 +264,20 @@ Result ShowFatalTask::ShowFatal() {
} }
/* Print Backtrace. */ /* Print Backtrace. */
u32 bt_size;
if (this->ctx->cpu_ctx.is_aarch32) {
bt_size = this->ctx->cpu_ctx.aarch32_ctx.stack_trace_size;
} else {
bt_size = this->ctx->cpu_ctx.aarch64_ctx.stack_trace_size;
}
if (bt_size == 0) {
if (this->ctx->cpu_ctx.is_aarch32) {
FontManager::PrintFormatLine("Start Address: 0x%08x", this->ctx->cpu_ctx.aarch32_ctx.start_address);
} else {
FontManager::PrintFormatLine("Start Address: 0x%016lx", this->ctx->cpu_ctx.aarch64_ctx.start_address);
}
} else {
FontManager::SetPosition(backtrace_x, backtrace_y); FontManager::SetPosition(backtrace_x, backtrace_y);
if (this->ctx->cpu_ctx.is_aarch32) { if (this->ctx->cpu_ctx.is_aarch32) {
FontManager::PrintFormatLine("Backtrace (Start Address = 0x%08x)", this->ctx->cpu_ctx.aarch32_ctx.start_address); FontManager::PrintFormatLine("Backtrace (Start Address = 0x%08x)", this->ctx->cpu_ctx.aarch32_ctx.start_address);
@ -324,6 +338,8 @@ Result ShowFatalTask::ShowFatal() {
FontManager::SetPosition(backtrace_x, FontManager::GetY()); FontManager::SetPosition(backtrace_x, FontManager::GetY());
} }
} }
}
/* Enqueue the buffer. */ /* Enqueue the buffer. */
framebufferEnd(&fb); framebufferEnd(&fb);