fatal: make aarch32 fatal screen prettier

This commit is contained in:
Michael Scire 2020-01-03 20:21:12 -08:00
parent d5458960d5
commit 5b1060b30e

View file

@ -263,8 +263,9 @@ namespace ams::fatal::srv {
font::SetPosition(x + 47, font::GetY()); font::SetPosition(x + 47, font::GetY());
if (this->context->cpu_ctx.aarch32_ctx.HasRegisterValue(static_cast<aarch32::RegisterName>(i))) { if (this->context->cpu_ctx.aarch32_ctx.HasRegisterValue(static_cast<aarch32::RegisterName>(i))) {
font::PrintMonospaceU32(this->context->cpu_ctx.aarch32_ctx.r[i]); font::PrintMonospaceU32(this->context->cpu_ctx.aarch32_ctx.r[i]);
} else {
font::PrintMonospaceBlank(8); font::PrintMonospaceBlank(8);
} else {
font::PrintMonospaceBlank(16);
} }
font::Print(" "); font::Print(" ");
x = font::GetX(); x = font::GetX();
@ -272,8 +273,9 @@ namespace ams::fatal::srv {
font::SetPosition(x + 47, font::GetY()); font::SetPosition(x + 47, font::GetY());
if (this->context->cpu_ctx.aarch32_ctx.HasRegisterValue(static_cast<aarch32::RegisterName>(i + (aarch32::RegisterName_GeneralPurposeCount / 2)))) { if (this->context->cpu_ctx.aarch32_ctx.HasRegisterValue(static_cast<aarch32::RegisterName>(i + (aarch32::RegisterName_GeneralPurposeCount / 2)))) {
font::PrintMonospaceU32(this->context->cpu_ctx.aarch32_ctx.r[i + (aarch32::RegisterName_GeneralPurposeCount / 2)]); font::PrintMonospaceU32(this->context->cpu_ctx.aarch32_ctx.r[i + (aarch32::RegisterName_GeneralPurposeCount / 2)]);
} else {
font::PrintMonospaceBlank(8); font::PrintMonospaceBlank(8);
} else {
font::PrintMonospaceBlank(16);
} }
if (i == (aarch32::RegisterName_GeneralPurposeCount / 2) - 1) { if (i == (aarch32::RegisterName_GeneralPurposeCount / 2) - 1) {
@ -354,6 +356,7 @@ namespace ams::fatal::srv {
font::PrintFormat("BT[%02d]: ", i); font::PrintFormat("BT[%02d]: ", i);
font::SetPosition(x + 72, font::GetY()); font::SetPosition(x + 72, font::GetY());
font::PrintMonospaceU32(bt_cur); font::PrintMonospaceU32(bt_cur);
font::PrintMonospaceBlank(8);
font::Print(" "); font::Print(" ");
} }
@ -362,6 +365,7 @@ namespace ams::fatal::srv {
font::PrintFormat("BT[%02d]: ", i + aarch32::CpuContext::MaxStackTraceDepth / 2); font::PrintFormat("BT[%02d]: ", i + aarch32::CpuContext::MaxStackTraceDepth / 2);
font::SetPosition(x + 72, font::GetY()); font::SetPosition(x + 72, font::GetY());
font::PrintMonospaceU32(bt_next); font::PrintMonospaceU32(bt_next);
font::PrintMonospaceBlank(8);
} }
font::PrintLine(""); font::PrintLine("");