#pragma once12#include <cstdint>34#include "Core/MIPS/MIPSStackWalk.h"56namespace Memory {78void MemFault_Init();910// Used by the hacky "Resume" button.11//12// TODO: Add a way to actually resume to the next instruction,13// rather than just jumping into the dispatcher again and hoping for the best. That will be14// a little tricky though, with per-backend work.15bool MemFault_MayBeResumable();16void MemFault_IgnoreLastCrash();1718// Called by exception handlers. We simply filter out accesses to PSP RAM and otherwise19// just leave it as-is.20bool HandleFault(uintptr_t hostAddress, void *context);2122}2324// Stack walk utility function, walks from the current state. Useful in the debugger and crash report screens etc.25// Doesn't exactly belong here maybe, but can think of worse locations.26// threadID can be -1 for current.27std::vector<MIPSStackWalk::StackFrame> WalkCurrentStack(int threadID);2829std::string FormatStackTrace(const std::vector<MIPSStackWalk::StackFrame> &frames);303132