summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-05-18 03:46:17 +0200
committerZach Hilman <zachhilman@gmail.com>2019-05-25 22:09:20 +0200
commit186db894b9e7f322d5d339468f33feca4689d5e9 (patch)
tree6d38902f9e9b7588229fad7104b849deec202254 /src/core/hle
parentcore: Add Reporter class to take/save reports (diff)
downloadyuzu-186db894b9e7f322d5d339468f33feca4689d5e9.tar
yuzu-186db894b9e7f322d5d339468f33feca4689d5e9.tar.gz
yuzu-186db894b9e7f322d5d339468f33feca4689d5e9.tar.bz2
yuzu-186db894b9e7f322d5d339468f33feca4689d5e9.tar.lz
yuzu-186db894b9e7f322d5d339468f33feca4689d5e9.tar.xz
yuzu-186db894b9e7f322d5d339468f33feca4689d5e9.tar.zst
yuzu-186db894b9e7f322d5d339468f33feca4689d5e9.zip
Diffstat (limited to 'src/core/hle')
-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 5a5851f66..8b5216384 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,