creport: Further skeleton the CrashReport object.
This commit is contained in:
30
stratosphere/creport/source/creport_crash_report.hpp
Normal file
30
stratosphere/creport/source/creport_crash_report.hpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include <switch.h>
|
||||
|
||||
class CrashReport {
|
||||
private:
|
||||
Handle debug_handle;
|
||||
bool has_extra_info;
|
||||
Result result;
|
||||
|
||||
public:
|
||||
CrashReport() : debug_handle(INVALID_HANDLE), result(0x4A2) { }
|
||||
|
||||
void BuildReport(u64 pid, bool has_extra_info);
|
||||
|
||||
Result GetResult() {
|
||||
return this->result;
|
||||
}
|
||||
|
||||
bool OpenProcess(u64 pid) {
|
||||
return R_SUCCEEDED(svcDebugActiveProcess(&debug_handle, pid));
|
||||
}
|
||||
|
||||
void Close() {
|
||||
if (debug_handle != INVALID_HANDLE) {
|
||||
svcCloseHandle(debug_handle);
|
||||
debug_handle = INVALID_HANDLE;
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user