creport: Clean up bugs, now saves (empty) reports to the SD successfully
This commit is contained in:
@@ -16,7 +16,7 @@ class CodeList {
|
||||
u32 code_count;
|
||||
CodeInfo code_infos[max_code_count];
|
||||
public:
|
||||
CodeList() : code_count(0), code_infos({}) { }
|
||||
CodeList() : code_count(0) { }
|
||||
|
||||
void ReadCodeRegionsFromProcess(Handle debug_handle, u64 pc, u64 lr);
|
||||
private:
|
||||
|
||||
@@ -31,7 +31,7 @@ void CrashReport::SaveReport() {
|
||||
}
|
||||
|
||||
/* Open report file. */
|
||||
snprintf(report_path, sizeof(report_path) - 1, "sdmc:/atmosphere/crash reports/%016lx_%016lx.log", timestamp, process_info.title_id);
|
||||
snprintf(report_path, sizeof(report_path) - 1, "sdmc:/atmosphere/crash reports/%020lu_%016lx.log", timestamp, process_info.title_id);
|
||||
FILE *f_report = fopen(report_path, "w");
|
||||
if (f_report == NULL) {
|
||||
return;
|
||||
|
||||
@@ -92,5 +92,10 @@ struct DebugEventInfo {
|
||||
DebugEventType type;
|
||||
u32 flags;
|
||||
u64 thread_id;
|
||||
DebugInfo info;
|
||||
};
|
||||
union {
|
||||
DebugInfo info;
|
||||
u64 _[0x40/sizeof(u64)];
|
||||
};
|
||||
};
|
||||
|
||||
static_assert(sizeof(DebugEventInfo) >= 0x50, "Incorrect DebugEventInfo definition!");
|
||||
@@ -46,7 +46,7 @@ bool ThreadInfo::ReadFromProcess(Handle debug_handle, u64 thread_id, bool is_64_
|
||||
|
||||
/* Advance to the next frame. */
|
||||
this->stack_trace[this->stack_trace_size++] = cur_frame.lr;
|
||||
cur_fp = cur_frame.lr;
|
||||
cur_fp = cur_frame.fp;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -53,7 +53,7 @@ class ThreadList {
|
||||
u32 thread_count;
|
||||
ThreadInfo thread_infos[max_thread_count];
|
||||
public:
|
||||
ThreadList() : thread_count(0), thread_infos({}) { }
|
||||
ThreadList() : thread_count(0) { }
|
||||
|
||||
void ReadThreadsFromProcess(Handle debug_handle, bool is_64_bit);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user