diff options
| author | 2019-06-21 14:05:18 -0400 | |
|---|---|---|
| committer | 2019-06-21 14:05:18 -0400 | |
| commit | 96412848a9db0643198ea882824688f23dc19606 (patch) | |
| tree | 2824eafaf4bc026cc3fc0ee498d1c5c623f3aa65 /src/core/hle/kernel/svc.cpp | |
| parent | Merge pull request #2291 from DarkLordZach/homebrew-testing (diff) | |
| parent | loader: Move NSO module tracking to AppLoader (diff) | |
| download | yuzu-96412848a9db0643198ea882824688f23dc19606.tar.gz yuzu-96412848a9db0643198ea882824688f23dc19606.tar.xz yuzu-96412848a9db0643198ea882824688f23dc19606.zip | |
Merge pull request #2482 from DarkLordZach/prepo
core: Add detailed local reporting feature for development
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
| -rw-r--r-- | src/core/hle/kernel/svc.cpp | 8 |
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 @@ | |||
| 38 | #include "core/hle/result.h" | 38 | #include "core/hle/result.h" |
| 39 | #include "core/hle/service/service.h" | 39 | #include "core/hle/service/service.h" |
| 40 | #include "core/memory.h" | 40 | #include "core/memory.h" |
| 41 | #include "core/reporter.h" | ||
| 41 | 42 | ||
| 42 | namespace Kernel { | 43 | namespace Kernel { |
| 43 | namespace { | 44 | namespace { |
| @@ -594,6 +595,7 @@ struct BreakReason { | |||
| 594 | static void Break(Core::System& system, u32 reason, u64 info1, u64 info2) { | 595 | static void Break(Core::System& system, u32 reason, u64 info1, u64 info2) { |
| 595 | BreakReason break_reason{reason}; | 596 | BreakReason break_reason{reason}; |
| 596 | bool has_dumped_buffer{}; | 597 | bool has_dumped_buffer{}; |
| 598 | std::vector<u8> debug_buffer; | ||
| 597 | 599 | ||
| 598 | const auto handle_debug_buffer = [&](VAddr addr, u64 sz) { | 600 | const auto handle_debug_buffer = [&](VAddr addr, u64 sz) { |
| 599 | if (sz == 0 || addr == 0 || has_dumped_buffer) { | 601 | if (sz == 0 || addr == 0 || has_dumped_buffer) { |
| @@ -605,7 +607,7 @@ static void Break(Core::System& system, u32 reason, u64 info1, u64 info2) { | |||
| 605 | LOG_CRITICAL(Debug_Emulated, "debug_buffer_err_code={:X}", Memory::Read32(addr)); | 607 | LOG_CRITICAL(Debug_Emulated, "debug_buffer_err_code={:X}", Memory::Read32(addr)); |
| 606 | } else { | 608 | } else { |
| 607 | // We don't know what's in here so we'll hexdump it | 609 | // We don't know what's in here so we'll hexdump it |
| 608 | std::vector<u8> debug_buffer(sz); | 610 | debug_buffer.resize(sz); |
| 609 | Memory::ReadBlock(addr, debug_buffer.data(), sz); | 611 | Memory::ReadBlock(addr, debug_buffer.data(), sz); |
| 610 | std::string hexdump; | 612 | std::string hexdump; |
| 611 | for (std::size_t i = 0; i < debug_buffer.size(); i++) { | 613 | 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) { | |||
| 664 | break; | 666 | break; |
| 665 | } | 667 | } |
| 666 | 668 | ||
| 669 | system.GetReporter().SaveSvcBreakReport( | ||
| 670 | static_cast<u32>(break_reason.break_type.Value()), break_reason.signal_debugger, info1, | ||
| 671 | info2, has_dumped_buffer ? std::make_optional(debug_buffer) : std::nullopt); | ||
| 672 | |||
| 667 | if (!break_reason.signal_debugger) { | 673 | if (!break_reason.signal_debugger) { |
| 668 | LOG_CRITICAL( | 674 | LOG_CRITICAL( |
| 669 | Debug_Emulated, | 675 | Debug_Emulated, |