From 41dafa88609ef07f0b42f00b23406a86c071939e Mon Sep 17 00:00:00 2001 From: Doug Johnson Date: Thu, 12 May 2016 01:43:19 -0600 Subject: [PATCH] Add stub exception handler backend for linux --- src/xenia/base/exception_handler_linux.cc | 36 +++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/xenia/base/exception_handler_linux.cc diff --git a/src/xenia/base/exception_handler_linux.cc b/src/xenia/base/exception_handler_linux.cc new file mode 100644 index 000000000..16fc669ad --- /dev/null +++ b/src/xenia/base/exception_handler_linux.cc @@ -0,0 +1,36 @@ +/** + ****************************************************************************** + * Xenia : Xbox 360 Emulator Research Project * + ****************************************************************************** + * Copyright 2015 Ben Vanik. All rights reserved. * + * Released under the BSD license - see LICENSE in the root for more details. * + ****************************************************************************** + */ + +#include "xenia/base/exception_handler.h" + +#include "xenia/base/assert.h" +#include "xenia/base/math.h" +#include "xenia/base/platform_linux.h" + +namespace xe { + +// This can be as large as needed, but isn't often needed. +// As we will be sometimes firing many exceptions we want to avoid having to +// scan the table too much or invoke many custom handlers. +constexpr size_t kMaxHandlerCount = 8; + +// All custom handlers, left-aligned and null terminated. +// Executed in order. +std::pair handlers_[kMaxHandlerCount]; + + +void ExceptionHandler::Install(Handler fn, void* data) { + //TODO(dougvj) stub +} + +void ExceptionHandler::Uninstall(Handler fn, void* data) { + //TODO(dougvj) stub +} + +} // namespace xe