creport: Read exception info properly (except for crashed thread info)

This commit is contained in:
Michael Scire
2018-06-25 02:18:26 -06:00
parent 4e7fcc1a50
commit 7cd44e8980
3 changed files with 62 additions and 19 deletions

View File

@@ -29,13 +29,18 @@ class CrashReport {
u64 userdata_5x_address;
u64 userdata_5x_size;
/* Exception Info. */
ExceptionInfo exception_info;
public:
CrashReport() : debug_handle(INVALID_HANDLE), result((Result)CrashReportResult::IncompleteReport), process_info({0}) { }
CrashReport() : debug_handle(INVALID_HANDLE), result((Result)CrashReportResult::IncompleteReport), process_info({}), exception_info({}) { }
void BuildReport(u64 pid, bool has_extra_info);
void SaveReport();
void ProcessExceptions();
bool IsAddressReadable(u64 address, u64 size, MemoryInfo *mi = NULL);
Result GetResult() {
return this->result;
}
@@ -68,7 +73,7 @@ class CrashReport {
}
bool IsUserBreak() {
return this->result == (Result)CrashReportResult::UserBreak;
return this->exception_info.type == DebugExceptionType::UserBreak;
}
private:
void HandleAttachProcess(DebugEventInfo &d);