summary refs log tree commit diff
path: root/src/rt/rust_upcall.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-09-12 09:36:51 -0700
committerBrian Anderson <banderson@mozilla.com>2011-09-12 09:36:51 -0700
commit393deeb06ff8017a93b0fd26c1f6968fdff2b15b (patch)
tree3dacb71e604095ec94a8f350f44467b7640f289d /src/rt/rust_upcall.cpp
parentedde2e0c457de6e5d17373bfa90ef319df4a1566 (diff)
parent6ffcfba6b990d6f27243e4dd6ddfffab141e1f44 (diff)
downloadrust-393deeb06ff8017a93b0fd26c1f6968fdff2b15b.tar.gz
rust-393deeb06ff8017a93b0fd26c1f6968fdff2b15b.zip
Merge branch 'unwind'
Conflicts:
	src/comp/middle/trans.rs
	src/comp/middle/trans_build.rs
	src/lib/run_program.rs
	src/test/compiletest/runtest.rs
Diffstat (limited to 'src/rt/rust_upcall.cpp')
-rw-r--r--src/rt/rust_upcall.cpp22
1 files changed, 22 insertions, 0 deletions
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 <stdint.h>
+#include <unwind.h>
 
 // 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++