diff --git a/libraries/libmesosphere/source/arch/arm64/kern_exception_handlers.cpp b/libraries/libmesosphere/source/arch/arm64/kern_exception_handlers.cpp index 41adafb99..67e6fbab5 100644 --- a/libraries/libmesosphere/source/arch/arm64/kern_exception_handlers.cpp +++ b/libraries/libmesosphere/source/arch/arm64/kern_exception_handlers.cpp @@ -293,6 +293,13 @@ namespace ams::kern::arch::arm64 { /* Print that an exception occurred. */ MESOSPHERE_RELEASE_LOG("Exception occurred. %016lx\n", GetCurrentProcess().GetProgramId()); + { + /* Print the current thread's registers. */ + KDebug::PrintRegister(); + + /* Print a backtrace. */ + KDebug::PrintBacktrace(); + } /* If the SVC is handled, handle it. */ if (!svc::ResultNotHandled::Includes(result)) { diff --git a/libraries/libmesosphere/source/kern_k_dump_object.cpp b/libraries/libmesosphere/source/kern_k_dump_object.cpp index 1c8f3cb12..a5f7eb125 100644 --- a/libraries/libmesosphere/source/kern_k_dump_object.cpp +++ b/libraries/libmesosphere/source/kern_k_dump_object.cpp @@ -62,7 +62,7 @@ namespace ams::kern::KDumpObject { const auto end = accessor.end(); const auto &handle_table = process->GetHandleTable(); - const size_t max_handles = handle_table.GetMaxCount(); + const size_t max_handles = handle_table.GetTableSize(); for (size_t i = 0; i < max_handles; ++i) { /* Get the object + handle. */ ams::svc::Handle handle = ams::svc::InvalidHandle; @@ -181,7 +181,7 @@ namespace ams::kern::KDumpObject { const auto end = accessor.end(); const auto &handle_table = process->GetHandleTable(); - const size_t max_handles = handle_table.GetMaxCount(); + const size_t max_handles = handle_table.GetTableSize(); for (size_t i = 0; i < max_handles; ++i) { /* Get the object + handle. */ ams::svc::Handle handle = ams::svc::InvalidHandle; @@ -203,7 +203,7 @@ namespace ams::kern::KDumpObject { { for (auto it = accessor.begin(); it != end && client_port_process.IsNull(); ++it) { KProcess *cur = static_cast(std::addressof(*it)); - for (size_t j = 0; j < cur->GetHandleTable().GetMaxCount(); ++j) { + for (size_t j = 0; j < cur->GetHandleTable().GetTableSize(); ++j) { ams::svc::Handle cur_h = ams::svc::InvalidHandle; KScopedAutoObject cur_o = cur->GetHandleTable().GetObjectByIndex(std::addressof(cur_h), j); if (cur_o.IsNotNull()) { @@ -236,7 +236,7 @@ namespace ams::kern::KDumpObject { { for (auto it = accessor.begin(); it != end; ++it) { KProcess *cur = static_cast(std::addressof(*it)); - for (size_t j = 0; j < cur->GetHandleTable().GetMaxCount(); ++j) { + for (size_t j = 0; j < cur->GetHandleTable().GetTableSize(); ++j) { ams::svc::Handle cur_h = ams::svc::InvalidHandle; KScopedAutoObject cur_o = cur->GetHandleTable().GetObjectByIndex(std::addressof(cur_h), j); if (cur_o.IsNull()) {