creport: Complete crash report saving.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <switch.h>
|
||||
#include <cstdio>
|
||||
|
||||
#include "creport_debug_types.hpp"
|
||||
#include "creport_thread_info.hpp"
|
||||
@@ -43,14 +44,16 @@ class CrashReport {
|
||||
ThreadList thread_list;
|
||||
|
||||
public:
|
||||
CrashReport() : debug_handle(INVALID_HANDLE), result((Result)CrashReportResult::IncompleteReport), process_info({}), dying_message_address(0),
|
||||
dying_message_size(0), dying_message{}, exception_info({}) { }
|
||||
CrashReport() : debug_handle(INVALID_HANDLE), result((Result)CrashReportResult::IncompleteReport), process_info{0}, dying_message_address(0),
|
||||
dying_message_size(0), dying_message{0}, exception_info({}) { }
|
||||
|
||||
void BuildReport(u64 pid, bool has_extra_info);
|
||||
void SaveReport();
|
||||
|
||||
bool IsAddressReadable(u64 address, u64 size, MemoryInfo *mi = NULL);
|
||||
|
||||
static void Memdump(FILE *f, const char *prefix, const void *data, size_t size);
|
||||
|
||||
Result GetResult() {
|
||||
return this->result;
|
||||
}
|
||||
@@ -91,6 +94,8 @@ class CrashReport {
|
||||
void HandleAttachProcess(DebugEventInfo &d);
|
||||
void HandleException(DebugEventInfo &d);
|
||||
|
||||
void SaveToFile(FILE *f);
|
||||
|
||||
void EnsureReportDirectories();
|
||||
bool GetCurrentTime(u64 *out);
|
||||
};
|
||||
Reference in New Issue
Block a user