Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hrydgard
GitHub Repository: hrydgard/ppsspp
Path: blob/master/Common/ExceptionHandlerSetup.h
3185 views
1
// Copyright 2008 Dolphin Emulator Project
2
// Licensed under GPLv2+
3
// Refer to the license.txt file included.
4
5
#pragma once
6
7
#include <cstdint>
8
9
// On Windows, context is a CONTEXT object.
10
// On Apple, context is a x86_thread_state64_t.
11
// On Unix/Linux, context is a mcontext_t.
12
// On OpenBSD, context is a ucontext_t.
13
// Ugh, might need to abstract this better.
14
typedef bool (*BadAccessHandler)(uintptr_t address, void *context);
15
16
void InstallExceptionHandler(BadAccessHandler accessHandler);
17
18
// Implementation note: This must be a no-op if InstallExceptionHandler hasn't been called.
19
void UninstallExceptionHandler();
20
21