summaryrefslogtreecommitdiff
path: root/src/core/reporter.cpp
diff options
context:
space:
mode:
authorGravatar Fernando S2023-12-06 14:19:17 +0100
committerGravatar GitHub2023-12-06 14:19:17 +0100
commit8a79dd2d6c6445bff63ea1f2f5f1611a6afcd97a (patch)
tree265bf3c7970a570479c6a3ac1250549995f0329c /src/core/reporter.cpp
parentMerge pull request #12271 from liamwhite/pretext-fix (diff)
parentarm: fix context save of vector regs (diff)
downloadyuzu-8a79dd2d6c6445bff63ea1f2f5f1611a6afcd97a.tar.gz
yuzu-8a79dd2d6c6445bff63ea1f2f5f1611a6afcd97a.tar.xz
yuzu-8a79dd2d6c6445bff63ea1f2f5f1611a6afcd97a.zip
Merge pull request #12236 from liamwhite/cpu-refactor
core: refactor emulated cpu core activation
Diffstat (limited to 'src/core/reporter.cpp')
-rw-r--r--src/core/reporter.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/core/reporter.cpp b/src/core/reporter.cpp
index 5d168cbc1..dc3883528 100644
--- a/src/core/reporter.cpp
+++ b/src/core/reporter.cpp
@@ -109,41 +109,11 @@ json GetProcessorStateData(const std::string& architecture, u64 entry_point, u64
109 return out; 109 return out;
110} 110}
111 111
112json GetProcessorStateDataAuto(Core::System& system) {
113 const auto* process{system.ApplicationProcess()};
114 auto& arm{system.CurrentArmInterface()};
115
116 Core::ARM_Interface::ThreadContext64 context{};
117 arm.SaveContext(context);
118
119 return GetProcessorStateData(process->Is64Bit() ? "AArch64" : "AArch32",
120 GetInteger(process->GetEntryPoint()), context.sp, context.pc,
121 context.pstate, context.cpu_registers);
122}
123
124json GetBacktraceData(Core::System& system) {
125 auto out = json::array();
126 const auto& backtrace{system.CurrentArmInterface().GetBacktrace()};
127 for (const auto& entry : backtrace) {
128 out.push_back({
129 {"module", entry.module},
130 {"address", fmt::format("{:016X}", entry.address)},
131 {"original_address", fmt::format("{:016X}", entry.original_address)},
132 {"offset", fmt::format("{:016X}", entry.offset)},
133 {"symbol_name", entry.name},
134 });
135 }
136
137 return out;
138}
139
140json GetFullDataAuto(const std::string& timestamp, u64 title_id, Core::System& system) { 112json GetFullDataAuto(const std::string& timestamp, u64 title_id, Core::System& system) {
141 json out; 113 json out;
142 114
143 out["yuzu_version"] = GetYuzuVersionData(); 115 out["yuzu_version"] = GetYuzuVersionData();
144 out["report_common"] = GetReportCommonData(title_id, ResultSuccess, timestamp); 116 out["report_common"] = GetReportCommonData(title_id, ResultSuccess, timestamp);
145 out["processor_state"] = GetProcessorStateDataAuto(system);
146 out["backtrace"] = GetBacktraceData(system);
147 117
148 return out; 118 return out;
149} 119}
@@ -351,8 +321,6 @@ void Reporter::SaveErrorReport(u64 title_id, Result result,
351 321
352 out["yuzu_version"] = GetYuzuVersionData(); 322 out["yuzu_version"] = GetYuzuVersionData();
353 out["report_common"] = GetReportCommonData(title_id, result, timestamp); 323 out["report_common"] = GetReportCommonData(title_id, result, timestamp);
354 out["processor_state"] = GetProcessorStateDataAuto(system);
355 out["backtrace"] = GetBacktraceData(system);
356 324
357 out["error_custom_text"] = { 325 out["error_custom_text"] = {
358 {"main", custom_text_main.value_or("")}, 326 {"main", custom_text_main.value_or("")},