summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/svc.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-06-21 20:05:18 +0200
committerGitHub <noreply@github.com>2019-06-21 20:05:18 +0200
commit96412848a9db0643198ea882824688f23dc19606 (patch)
tree2824eafaf4bc026cc3fc0ee498d1c5c623f3aa65 /src/core/hle/kernel/svc.cpp
parentMerge pull request #2291 from DarkLordZach/homebrew-testing (diff)
parentloader: Move NSO module tracking to AppLoader (diff)
downloadyuzu-96412848a9db0643198ea882824688f23dc19606.tar
yuzu-96412848a9db0643198ea882824688f23dc19606.tar.gz
yuzu-96412848a9db0643198ea882824688f23dc19606.tar.bz2
yuzu-96412848a9db0643198ea882824688f23dc19606.tar.lz
yuzu-96412848a9db0643198ea882824688f23dc19606.tar.xz
yuzu-96412848a9db0643198ea882824688f23dc19606.tar.zst
yuzu-96412848a9db0643198ea882824688f23dc19606.zip
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r--src/core/hle/kernel/svc.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index f9c606bc5..de6363ff2 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -38,6 +38,7 @@
#include "core/hle/result.h"
#include "core/hle/service/service.h"
#include "core/memory.h"
+#include "core/reporter.h"
namespace Kernel {
namespace {
@@ -594,6 +595,7 @@ struct BreakReason {
static void Break(Core::System& system, u32 reason, u64 info1, u64 info2) {
BreakReason break_reason{reason};
bool has_dumped_buffer{};
+ std::vector<u8> debug_buffer;
const auto handle_debug_buffer = [&](VAddr addr, u64 sz) {
if (sz == 0 || addr == 0 || has_dumped_buffer) {
@@ -605,7 +607,7 @@ static void Break(Core::System& system, u32 reason, u64 info1, u64 info2) {
LOG_CRITICAL(Debug_Emulated, "debug_buffer_err_code={:X}", Memory::Read32(addr));
} else {
// We don't know what's in here so we'll hexdump it
- std::vector<u8> debug_buffer(sz);
+ debug_buffer.resize(sz);
Memory::ReadBlock(addr, debug_buffer.data(), sz);
std::string hexdump;
for (std::size_t i = 0; i < debug_buffer.size(); i++) {
@@ -664,6 +666,10 @@ static void Break(Core::System& system, u32 reason, u64 info1, u64 info2) {
break;
}
+ system.GetReporter().SaveSvcBreakReport(
+ static_cast<u32>(break_reason.break_type.Value()), break_reason.signal_debugger, info1,
+ info2, has_dumped_buffer ? std::make_optional(debug_buffer) : std::nullopt);
+
if (!break_reason.signal_debugger) {
LOG_CRITICAL(
Debug_Emulated,