summaryrefslogtreecommitdiff
path: root/src/core/reporter.h
diff options
context:
space:
mode:
authorGravatar bunnei2019-10-08 20:23:13 -0400
committerGravatar GitHub2019-10-08 20:23:13 -0400
commitb9c831de623df5a58cc5aa47392d6841bfef8d8b (patch)
tree2242bd5c0931997af15beccde978434b79a8d1d9 /src/core/reporter.h
parentMerge pull request #2961 from DarkLordZach/azure-tag-names (diff)
parentlm: Flush manager output on core shutdown (diff)
downloadyuzu-b9c831de623df5a58cc5aa47392d6841bfef8d8b.tar.gz
yuzu-b9c831de623df5a58cc5aa47392d6841bfef8d8b.tar.xz
yuzu-b9c831de623df5a58cc5aa47392d6841bfef8d8b.zip
Merge pull request #2654 from DarkLordZach/lm-log-rewrite
lm: Rewrite logger to use core reporting services
Diffstat (limited to 'src/core/reporter.h')
-rw-r--r--src/core/reporter.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/reporter.h b/src/core/reporter.h
index f08aa11fb..380941b1b 100644
--- a/src/core/reporter.h
+++ b/src/core/reporter.h
@@ -20,6 +20,10 @@ namespace Service::FileSystem {
20enum class LogMode : u32; 20enum class LogMode : u32;
21} 21}
22 22
23namespace Service::LM {
24struct LogMessage;
25} // namespace Service::LM
26
23namespace Core { 27namespace Core {
24 28
25class System; 29class System;
@@ -29,18 +33,22 @@ public:
29 explicit Reporter(System& system); 33 explicit Reporter(System& system);
30 ~Reporter(); 34 ~Reporter();
31 35
36 // Used by fatal services
32 void SaveCrashReport(u64 title_id, ResultCode result, u64 set_flags, u64 entry_point, u64 sp, 37 void SaveCrashReport(u64 title_id, ResultCode result, u64 set_flags, u64 entry_point, u64 sp,
33 u64 pc, u64 pstate, u64 afsr0, u64 afsr1, u64 esr, u64 far, 38 u64 pc, u64 pstate, u64 afsr0, u64 afsr1, u64 esr, u64 far,
34 const std::array<u64, 31>& registers, const std::array<u64, 32>& backtrace, 39 const std::array<u64, 31>& registers, const std::array<u64, 32>& backtrace,
35 u32 backtrace_size, const std::string& arch, u32 unk10) const; 40 u32 backtrace_size, const std::string& arch, u32 unk10) const;
36 41
42 // Used by syscall svcBreak
37 void SaveSvcBreakReport(u32 type, bool signal_debugger, u64 info1, u64 info2, 43 void SaveSvcBreakReport(u32 type, bool signal_debugger, u64 info1, u64 info2,
38 std::optional<std::vector<u8>> resolved_buffer = {}) const; 44 std::optional<std::vector<u8>> resolved_buffer = {}) const;
39 45
46 // Used by HLE service handler
40 void SaveUnimplementedFunctionReport(Kernel::HLERequestContext& ctx, u32 command_id, 47 void SaveUnimplementedFunctionReport(Kernel::HLERequestContext& ctx, u32 command_id,
41 const std::string& name, 48 const std::string& name,
42 const std::string& service_name) const; 49 const std::string& service_name) const;
43 50
51 // Used by stub applet implementation
44 void SaveUnimplementedAppletReport(u32 applet_id, u32 common_args_version, u32 library_version, 52 void SaveUnimplementedAppletReport(u32 applet_id, u32 common_args_version, u32 library_version,
45 u32 theme_color, bool startup_sound, u64 system_tick, 53 u32 theme_color, bool startup_sound, u64 system_tick,
46 std::vector<std::vector<u8>> normal_channel, 54 std::vector<std::vector<u8>> normal_channel,
@@ -55,6 +63,7 @@ public:
55 void SavePlayReport(PlayReportType type, u64 title_id, std::vector<std::vector<u8>> data, 63 void SavePlayReport(PlayReportType type, u64 title_id, std::vector<std::vector<u8>> data,
56 std::optional<u64> process_id = {}, std::optional<u128> user_id = {}) const; 64 std::optional<u64> process_id = {}, std::optional<u128> user_id = {}) const;
57 65
66 // Used by error applet
58 void SaveErrorReport(u64 title_id, ResultCode result, 67 void SaveErrorReport(u64 title_id, ResultCode result,
59 std::optional<std::string> custom_text_main = {}, 68 std::optional<std::string> custom_text_main = {},
60 std::optional<std::string> custom_text_detail = {}) const; 69 std::optional<std::string> custom_text_detail = {}) const;
@@ -62,6 +71,11 @@ public:
62 void SaveFilesystemAccessReport(Service::FileSystem::LogMode log_mode, 71 void SaveFilesystemAccessReport(Service::FileSystem::LogMode log_mode,
63 std::string log_message) const; 72 std::string log_message) const;
64 73
74 // Used by lm services
75 void SaveLogReport(u32 destination, std::vector<Service::LM::LogMessage> messages) const;
76
77 // Can be used anywhere to generate a backtrace and general info report at any point during
78 // execution. Not intended to be used for anything other than debugging or testing.
65 void SaveUserReport() const; 79 void SaveUserReport() const;
66 80
67private: 81private: