From 9f4b4d89cee40a04bf4b3227e378588e438e588a Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 7 Sep 2011 11:44:34 -0700 Subject: Add upcall_rust_personality This just wraps __gxx_personality_v0 with our upcall naming convention Issue #236 --- src/rt/rust_upcall.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/rt/rust_upcall.cpp') diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp index 2d7791e876f..0f5c11537fe 100644 --- a/src/rt/rust_upcall.cpp +++ b/src/rt/rust_upcall.cpp @@ -1,6 +1,8 @@ #include "rust_gc.h" #include "rust_internal.h" #include "rust_upcall.h" +#include +#include // Upcalls. @@ -190,6 +192,26 @@ upcall_dynastack_free(rust_task *task, void *ptr) { return task->dynastack.free(ptr); } +extern "C" _Unwind_Reason_Code +__gxx_personality_v0(int version, + _Unwind_Action actions, + uint64_t exception_class, + _Unwind_Exception *ue_header, + _Unwind_Context *context); + +extern "C" _Unwind_Reason_Code +upcall_rust_personality(int version, + _Unwind_Action actions, + uint64_t exception_class, + _Unwind_Exception *ue_header, + _Unwind_Context *context) { + return __gxx_personality_v0(version, + actions, + exception_class, + ue_header, + context); +} + // // Local Variables: // mode: C++ -- cgit 1.4.1-3-g733a5