From c4a56f7368404265a1189d3f3202f4dedfd5d0f1 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Thu, 10 Feb 2011 11:29:47 -0800 Subject: Commit the trap-failure hack to the runtime, since I keep using it in my workspace anyways. --- src/rt/rust_upcall.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/rt/rust_upcall.cpp') diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp index 7e2fac10..46e53048 100644 --- a/src/rt/rust_upcall.cpp +++ b/src/rt/rust_upcall.cpp @@ -253,6 +253,10 @@ upcall_fail(rust_task *task, task->log(rust_log::UPCALL | rust_log::ERR, "upcall fail '%s', %s:%" PRIdPTR, expr, file, line); task->fail(4); + if (getenv("RUST_TRAP_FAILURE")) { + // FIXME: x86-ism. + __asm__("int3"); + } } /** -- cgit v1.2.3