CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hrydgard

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: hrydgard/ppsspp
Path: blob/master/Core/MemFault.h
Views: 1401
1
#pragma once
2
3
#include <cstdint>
4
5
#include "Core/MIPS/MIPSStackWalk.h"
6
7
namespace Memory {
8
9
void MemFault_Init();
10
11
// Used by the hacky "Resume" button.
12
//
13
// TODO: Add a way to actually resume to the next instruction,
14
// rather than just jumping into the dispatcher again and hoping for the best. That will be
15
// a little tricky though, with per-backend work.
16
bool MemFault_MayBeResumable();
17
void MemFault_IgnoreLastCrash();
18
19
// Called by exception handlers. We simply filter out accesses to PSP RAM and otherwise
20
// just leave it as-is.
21
bool HandleFault(uintptr_t hostAddress, void *context);
22
23
}
24
25
// Stack walk utility function, walks from the current state. Useful in the debugger and crash report screens etc.
26
// Doesn't exactly belong here maybe, but can think of worse locations.
27
// threadID can be -1 for current.
28
std::vector<MIPSStackWalk::StackFrame> WalkCurrentStack(int threadID);
29
30
std::string FormatStackTrace(const std::vector<MIPSStackWalk::StackFrame> &frames);
31
32