abort/error: print backtrace, abuse templates, overhaul result/diag (macos not done yet)
This commit is contained in:
@@ -18,13 +18,13 @@
|
||||
|
||||
namespace ams::diag {
|
||||
|
||||
NORETURN void AbortImpl(const char *file, int line, const char *func, const char *expr, u64 value, const char *format, ...) {
|
||||
AMS_UNUSED(file, line, func, expr, value, format);
|
||||
NORETURN void AbortImpl(const char *expr, const char *func, const char *file, int line) {
|
||||
AMS_UNUSED(expr, func, line, file);
|
||||
ams::secmon::loader::ErrorReboot();
|
||||
}
|
||||
|
||||
NORETURN void AbortImpl(const char *file, int line, const char *func, const char *expr, u64 value) {
|
||||
AMS_UNUSED(file, line, func, expr, value);
|
||||
NORETURN void AbortImpl(const char *expr, const char *func, const char *file, int line, const char *format, ...) {
|
||||
AMS_UNUSED(expr, func, line, file, format);
|
||||
ams::secmon::loader::ErrorReboot();
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
namespace ams::diag {
|
||||
|
||||
void AbortImpl() {
|
||||
NORETURN void AbortImpl() {
|
||||
AMS_SECMON_LOG("AbortImpl was called\n");
|
||||
AMS_LOG_FLUSH();
|
||||
reg::Write(0x4, 0xAAAAAAAA);
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace ams::rebootstub {
|
||||
|
||||
namespace ams::diag {
|
||||
|
||||
void AbortImpl() {
|
||||
NORETURN void AbortImpl() {
|
||||
/* Halt the bpmp. */
|
||||
rebootstub::Halt();
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace ams::sc7fw {
|
||||
|
||||
namespace ams::diag {
|
||||
|
||||
void AbortImpl() {
|
||||
NORETURN void AbortImpl() {
|
||||
sc7fw::ExceptionHandler();
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace ams::diag {
|
||||
|
||||
}
|
||||
|
||||
void AbortImpl() {
|
||||
NORETURN void AbortImpl() {
|
||||
/* Perform any necessary (typically none) debugging. */
|
||||
if constexpr (SaveSystemStateForDebug) {
|
||||
SaveSystemStateForDebugAbort();
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace ams::warmboot {
|
||||
|
||||
namespace ams::diag {
|
||||
|
||||
void AbortImpl() {
|
||||
NORETURN void AbortImpl() {
|
||||
warmboot::ExceptionHandler();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user