kern: clean up majority of TODOs

This commit is contained in:
Michael Scire
2020-07-31 01:27:09 -07:00
committed by SciresM
parent bea550ebce
commit e1f3bb10a5
30 changed files with 112 additions and 85 deletions

View File

@@ -163,11 +163,11 @@ namespace ams::creport {
svc::DebugEventInfo d;
while (R_SUCCEEDED(svcGetDebugEvent(reinterpret_cast<u8 *>(&d), this->debug_handle))) {
switch (d.type) {
case svc::DebugEvent_AttachProcess:
this->HandleDebugEventInfoAttachProcess(d);
case svc::DebugEvent_CreateProcess:
this->HandleDebugEventInfoCreateProcess(d);
break;
case svc::DebugEvent_AttachThread:
this->HandleDebugEventInfoAttachThread(d);
case svc::DebugEvent_CreateThread:
this->HandleDebugEventInfoCreateThread(d);
break;
case svc::DebugEvent_Exception:
this->HandleDebugEventInfoException(d);
@@ -182,8 +182,8 @@ namespace ams::creport {
this->crashed_thread.ReadFromProcess(this->debug_handle, this->thread_tls_map, this->crashed_thread_id, this->Is64Bit());
}
void CrashReport::HandleDebugEventInfoAttachProcess(const svc::DebugEventInfo &d) {
this->process_info = d.info.attach_process;
void CrashReport::HandleDebugEventInfoCreateProcess(const svc::DebugEventInfo &d) {
this->process_info = d.info.create_process;
/* On 5.0.0+, we want to parse out a dying message from application crashes. */
if (hos::GetVersion() < hos::Version_5_0_0 || !IsApplication()) {
@@ -217,9 +217,9 @@ namespace ams::creport {
this->dying_message_size = userdata_size;
}
void CrashReport::HandleDebugEventInfoAttachThread(const svc::DebugEventInfo &d) {
void CrashReport::HandleDebugEventInfoCreateThread(const svc::DebugEventInfo &d) {
/* Save info on the thread's TLS address for later. */
this->thread_tls_map[d.info.attach_thread.thread_id] = d.info.attach_thread.tls_address;
this->thread_tls_map[d.info.create_thread.thread_id] = d.info.create_thread.tls_address;
}
void CrashReport::HandleDebugEventInfoException(const svc::DebugEventInfo &d) {

View File

@@ -33,7 +33,7 @@ namespace ams::creport {
std::map<u64, u64> thread_tls_map;
/* Attach process info. */
svc::DebugInfoAttachProcess process_info = {};
svc::DebugInfoCreateProcess process_info = {};
u64 dying_message_address = 0;
u64 dying_message_size = 0;
u8 *dying_message = nullptr;
@@ -95,8 +95,8 @@ namespace ams::creport {
private:
void ProcessExceptions();
void ProcessDyingMessage();
void HandleDebugEventInfoAttachProcess(const svc::DebugEventInfo &d);
void HandleDebugEventInfoAttachThread(const svc::DebugEventInfo &d);
void HandleDebugEventInfoCreateProcess(const svc::DebugEventInfo &d);
void HandleDebugEventInfoCreateThread(const svc::DebugEventInfo &d);
void HandleDebugEventInfoException(const svc::DebugEventInfo &d);
void SaveToFile(ScopedFile &file);