From 884b59a0b308f448b63f856ea6b56af7a99106c5 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Mon, 2 Jul 2001 00:16:28 +0000 Subject: [PATCH] Added JIT debugging hooks [SVN r10507] --- example/dvect.cpp | 11 +++++++++++ example/ivect.cpp | 11 +++++++++++ example/noncopyable_export.cpp | 10 ++++++++++ example/noncopyable_import.cpp | 10 ++++++++++ 4 files changed, 42 insertions(+) diff --git a/example/dvect.cpp b/example/dvect.cpp index da6b35a3..4d109c96 100644 --- a/example/dvect.cpp +++ b/example/dvect.cpp @@ -20,6 +20,16 @@ namespace { } } +# ifdef BOOST_MSVC // fixes for JIT debugging +# include +extern "C" void structured_exception_translator(unsigned int, EXCEPTION_POINTERS*) +{ + throw; +} +extern "C" void (*old_translator)(unsigned int, EXCEPTION_POINTERS*) + = _set_se_translator(structured_exception_translator); +# endif + BOOST_PYTHON_MODULE_INIT(dvect) { try @@ -43,3 +53,4 @@ BOOST_PYTHON_MODULE_INIT(dvect) python::handle_exception(); // Deal with the exception for Python } } + diff --git a/example/ivect.cpp b/example/ivect.cpp index db1c0ec3..848d693e 100644 --- a/example/ivect.cpp +++ b/example/ivect.cpp @@ -20,6 +20,16 @@ namespace { } } +# ifdef BOOST_MSVC // fixes for JIT debugging +# include +extern "C" void structured_exception_translator(unsigned int, EXCEPTION_POINTERS*) +{ + throw; +} +extern "C" void (*old_translator)(unsigned int, EXCEPTION_POINTERS*) + = _set_se_translator(structured_exception_translator); +# endif + BOOST_PYTHON_MODULE_INIT(ivect) { try @@ -43,3 +53,4 @@ BOOST_PYTHON_MODULE_INIT(ivect) python::handle_exception(); // Deal with the exception for Python } } + diff --git a/example/noncopyable_export.cpp b/example/noncopyable_export.cpp index 794b1200..b118abb8 100644 --- a/example/noncopyable_export.cpp +++ b/example/noncopyable_export.cpp @@ -6,6 +6,16 @@ namespace python = boost::python; #include "noncopyable.h" +# ifdef BOOST_MSVC // fixes for JIT debugging +# include +extern "C" void structured_exception_translator(unsigned int, EXCEPTION_POINTERS*) +{ + throw; +} +extern "C" void (*old_translator)(unsigned int, EXCEPTION_POINTERS*) + = _set_se_translator(structured_exception_translator); +# endif + BOOST_PYTHON_MODULE_INIT(noncopyable_export) { try diff --git a/example/noncopyable_import.cpp b/example/noncopyable_import.cpp index ea2477be..66c6457d 100644 --- a/example/noncopyable_import.cpp +++ b/example/noncopyable_import.cpp @@ -19,6 +19,16 @@ namespace { // Avoid cluttering the global namespace. } } +# ifdef BOOST_MSVC // fixes for JIT debugging +# include +extern "C" void structured_exception_translator(unsigned int, EXCEPTION_POINTERS*) +{ + throw; +} +extern "C" void (*old_translator)(unsigned int, EXCEPTION_POINTERS*) + = _set_se_translator(structured_exception_translator); +# endif + BOOST_PYTHON_MODULE_INIT(noncopyable_import) { try