debugger: Add symbol support to PPC stack traces

Also moved the declaration to precompiled.h instead of redefining it wherever it is used
This commit is contained in:
Exzap 2024-07-26 05:08:38 +02:00
parent 252429933f
commit 47f1dcf996
6 changed files with 16 additions and 13 deletions

View file

@ -6,8 +6,6 @@
#include "Cafe/HW/Espresso/Debugger/GDBStub.h"
#include "ExceptionHandler.h"
void DebugLogStackTrace(OSThread_t* thread, MPTR sp);
bool crashLogCreated = false;
bool CrashLog_Create()
@ -97,7 +95,7 @@ void ExceptionHandler_LogGeneralInfo()
MPTR currentStackVAddr = hCPU->gpr[1];
CrashLog_WriteLine("");
CrashLog_WriteHeader("PPC stack trace");
DebugLogStackTrace(currentThread, currentStackVAddr);
DebugLogStackTrace(currentThread, currentStackVAddr, true);
// stack dump
CrashLog_WriteLine("");

View file

@ -552,6 +552,9 @@ inline uint32 GetTitleIdLow(uint64 titleId)
#include "Cafe/HW/Espresso/PPCState.h"
#include "Cafe/HW/Espresso/PPCCallback.h"
// PPC stack trace printer
void DebugLogStackTrace(struct OSThread_t* thread, MPTR sp, bool printSymbols = false);
// generic formatter for enums (to underlying)
template <typename Enum>
requires std::is_enum_v<Enum>