Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unity3.5 360 #24

Merged
merged 2 commits into from
Apr 12, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion mono/mini/mini-windows.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@


#include "jit-icalls.h" #include "jit-icalls.h"


extern LPTOP_LEVEL_EXCEPTION_FILTER old_win32_toplevel_exception_filter; extern LPTOP_LEVEL_EXCEPTION_FILTER old_win32_toplevel_exception_filter;
extern guint64 win32_chained_exception_filter_result; extern guint64 win32_chained_exception_filter_result;
extern gboolean win32_chained_exception_filter_didrun; extern gboolean win32_chained_exception_filter_didrun;
extern int (*gUnhandledExceptionHandler)(EXCEPTION_POINTERS*);


void void
mono_runtime_install_handlers (void) mono_runtime_install_handlers (void)
Expand Down Expand Up @@ -89,6 +90,12 @@ SIG_HANDLER_SIGNATURE (mono_chain_signal)
win32_chained_exception_filter_result = (*old_win32_toplevel_exception_filter)(info); win32_chained_exception_filter_result = (*old_win32_toplevel_exception_filter)(info);
return TRUE; return TRUE;
} }
if (gUnhandledExceptionHandler)
{
win32_chained_exception_filter_didrun = TRUE;
win32_chained_exception_filter_result = (*gUnhandledExceptionHandler)(info);
return TRUE;
}
return FALSE; return FALSE;
} }


Expand Down
3 changes: 3 additions & 0 deletions msvc/mono.def
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ mono_unity_socket_security_enabled_set
mono_set_ignore_version_and_key_when_finding_assemblies_already_loaded mono_set_ignore_version_and_key_when_finding_assemblies_already_loaded
mono_class_is_generic mono_class_is_generic
mono_class_is_inflated mono_class_is_inflated
mono_unity_seh_handler
mono_unity_set_unhandled_exception_handler

;Exports that should have been here, but I dont understand why they're not. ;Exports that should have been here, but I dont understand why they're not.
mono_security_enable_core_clr mono_security_enable_core_clr
mono_security_set_mode mono_security_set_mode
Expand Down
13 changes: 13 additions & 0 deletions unity/unity_utils.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -62,6 +62,19 @@ FILE* unity_fopen( const char *name, const char *mode )
return _wfopen( wideName, wideMode ); return _wfopen( wideName, wideMode );
} }


LONG CALLBACK seh_handler(EXCEPTION_POINTERS* ep);
LONG mono_unity_seh_handler(EXCEPTION_POINTERS* ep)
{
return seh_handler(ep);
}

int (*gUnhandledExceptionHandler)(EXCEPTION_POINTERS*) = NULL;

void mono_unity_set_unhandled_exception_handler(void* handler)
{
gUnhandledExceptionHandler = handler;
}

#endif //Win32 #endif //Win32


GString* gEmbeddingHostName = 0; GString* gEmbeddingHostName = 0;
Expand Down