mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-23 04:41:12 +00:00
creport: Clean up bugs, now saves (empty) reports to the SD successfully
This commit is contained in:
parent
12236eae9e
commit
d5b303f852
6 changed files with 14 additions and 7 deletions
|
@ -18,7 +18,6 @@
|
||||||
"csrng": false,
|
"csrng": false,
|
||||||
"erpt:c": false,
|
"erpt:c": false,
|
||||||
"fatal:u": false,
|
"fatal:u": false,
|
||||||
"fsp-srv": false,
|
|
||||||
"ns:dev": false,
|
"ns:dev": false,
|
||||||
"time:s": true
|
"time:s": true
|
||||||
},
|
},
|
||||||
|
@ -71,6 +70,8 @@
|
||||||
"svcOutputDebugString": "0x27",
|
"svcOutputDebugString": "0x27",
|
||||||
"svcReturnFromException": "0x28",
|
"svcReturnFromException": "0x28",
|
||||||
"svcGetInfo": "0x29",
|
"svcGetInfo": "0x29",
|
||||||
|
"svcWaitForAddress": "0x34",
|
||||||
|
"svcSignalToAddress": "0x35",
|
||||||
"svcCreateSession": "0x40",
|
"svcCreateSession": "0x40",
|
||||||
"svcAcceptSession": "0x41",
|
"svcAcceptSession": "0x41",
|
||||||
"svcReplyAndReceiveLight": "0x42",
|
"svcReplyAndReceiveLight": "0x42",
|
||||||
|
@ -81,6 +82,7 @@
|
||||||
"svcGetDebugEvent": "0x63",
|
"svcGetDebugEvent": "0x63",
|
||||||
"svcGetThreadList": "0x66",
|
"svcGetThreadList": "0x66",
|
||||||
"svcGetDebugThreadContext": "0x67",
|
"svcGetDebugThreadContext": "0x67",
|
||||||
|
"svcQueryDebugProcessMemory": "0x69",
|
||||||
"svcReadDebugProcessMemory": "0x6a",
|
"svcReadDebugProcessMemory": "0x6a",
|
||||||
"svcGetDebugThreadParam": "0x6d"
|
"svcGetDebugThreadParam": "0x6d"
|
||||||
},
|
},
|
||||||
|
|
|
@ -16,7 +16,7 @@ class CodeList {
|
||||||
u32 code_count;
|
u32 code_count;
|
||||||
CodeInfo code_infos[max_code_count];
|
CodeInfo code_infos[max_code_count];
|
||||||
public:
|
public:
|
||||||
CodeList() : code_count(0), code_infos({}) { }
|
CodeList() : code_count(0) { }
|
||||||
|
|
||||||
void ReadCodeRegionsFromProcess(Handle debug_handle, u64 pc, u64 lr);
|
void ReadCodeRegionsFromProcess(Handle debug_handle, u64 pc, u64 lr);
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -31,7 +31,7 @@ void CrashReport::SaveReport() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Open report file. */
|
/* 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");
|
FILE *f_report = fopen(report_path, "w");
|
||||||
if (f_report == NULL) {
|
if (f_report == NULL) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -92,5 +92,10 @@ struct DebugEventInfo {
|
||||||
DebugEventType type;
|
DebugEventType type;
|
||||||
u32 flags;
|
u32 flags;
|
||||||
u64 thread_id;
|
u64 thread_id;
|
||||||
|
union {
|
||||||
DebugInfo info;
|
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. */
|
/* Advance to the next frame. */
|
||||||
this->stack_trace[this->stack_trace_size++] = cur_frame.lr;
|
this->stack_trace[this->stack_trace_size++] = cur_frame.lr;
|
||||||
cur_fp = cur_frame.lr;
|
cur_fp = cur_frame.fp;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -53,7 +53,7 @@ class ThreadList {
|
||||||
u32 thread_count;
|
u32 thread_count;
|
||||||
ThreadInfo thread_infos[max_thread_count];
|
ThreadInfo thread_infos[max_thread_count];
|
||||||
public:
|
public:
|
||||||
ThreadList() : thread_count(0), thread_infos({}) { }
|
ThreadList() : thread_count(0) { }
|
||||||
|
|
||||||
void ReadThreadsFromProcess(Handle debug_handle, bool is_64_bit);
|
void ReadThreadsFromProcess(Handle debug_handle, bool is_64_bit);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue