905a6bc03c
Don't call any COOP macros when configuring the debugger/profiler. This occurs before the root domain has been created, which means that the current thread can't be attached. Since the COOP macros assert that the thread is attached, we end up aborting: Jun 29 13:35:56 Rolfs-Mac-Pro monotouchtest[97569]: Cannot enter GC safe region if the thread is not attached Thread 2 Crashed: 0 libsystem_kernel.dylib 0x08753572 __pthread_kill + 10 1 libsystem_pthread.dylib 0x0871b654 pthread_kill + 101 2 libsystem_c.dylib 0x084a962d abort + 156 3 com.xamarin.monotouch-test.watchkitapp.watchkitextension 0x0033901f monoeg_log_default_handler + 159 4 com.xamarin.monotouch-test.watchkitapp.watchkitextension 0x00339087 monoeg_g_log + 103 (goutput.c:114) 5 com.xamarin.monotouch-test.watchkitapp.watchkitextension 0x00329e00 check_info + 96 (mono-threads-coop.c:93) 6 com.xamarin.monotouch-test.watchkitapp.watchkitextension 0x00329b3d mono_threads_enter_gc_safe_region_unbalanced_with_info + 45 (mono-threads-coop.c:230) 7 com.xamarin.monotouch-test.watchkitapp.watchkitextension 0x00329a7a mono_threads_enter_gc_safe_region_with_info + 26 (mono-threads-coop.c:204) 8 com.xamarin.monotouch-test.watchkitapp.watchkitextension 0x00329a4b mono_threads_enter_gc_safe_region + 27 (mono-threads-coop.c:193) 9 com.xamarin.monotouch-test.watchkitapp.watchkitextension 0x0035e2d2 recv_uninterrupted(int, void*, int) + 50 (monotouch-debug.m:402) 10 com.xamarin.monotouch-test.watchkitapp.watchkitextension 0x0035e531 monotouch_process_connection(int) + 193 (monotouch-debug.m:828) 11 com.xamarin.monotouch-test.watchkitapp.watchkitextension 0x0035e0cf monotouch_connect_wifi(NSMutableArray*) + 2815 (monotouch-debug.m:604) 12 com.xamarin.monotouch-test.watchkitapp.watchkitextension 0x0035cb42 monotouch_configure_debugging + 3858 (monotouch-debug.m:344) 13 com.xamarin.monotouch-test.watchkitapp.watchkitextension 0x00351d37 -[CocoaThreadInitializer entryPoint:] + 119 (shared.m:131) 14 com.apple.Foundation 0x01d30259 -[NSThread main] + 76 15 com.apple.Foundation 0x01de5484 __NSThread__start__ + 1346 16 libsystem_pthread.dylib 0x08718780 _pthread_body + 138 17 libsystem_pthread.dylib 0x087186f6 _pthread_start + 155 18 libsystem_pthread.dylib 0x08715f7a thread_start + 34 |
||
---|---|---|
.. | ||
xamarin | ||
.gitignore | ||
COOP.md | ||
Delegates.cs.t4 | ||
EXCEPTIONS.md | ||
Makefile | ||
README.md | ||
bindings-generator.cs | ||
bindings-generator.csproj | ||
bindings.h | ||
bindings.m | ||
delegates.h.t4 | ||
delegates.inc.t4 | ||
delegates.t4 | ||
exports.t4 | ||
extension-main.m | ||
launcher.h | ||
launcher.m | ||
libmonotouch.csproj | ||
libxammac.csproj | ||
main-internal.h | ||
mono-runtime.h.t4 | ||
mono-runtime.m.t4 | ||
monotouch-debug.h | ||
monotouch-debug.m | ||
monotouch-main.m | ||
monotouch-support.h | ||
nsstring-localization.m | ||
product.h | ||
runtime-internal.h | ||
runtime.m | ||
shared.h | ||
shared.m | ||
slinked-list.h | ||
trampolines-i386-asm.s | ||
trampolines-i386-objc_msgSend-copyframe.inc | ||
trampolines-i386-objc_msgSend-post.inc | ||
trampolines-i386-objc_msgSend-pre.inc | ||
trampolines-i386-objc_msgSend.s | ||
trampolines-i386-objc_msgSendSuper.s | ||
trampolines-i386-objc_msgSendSuper_stret.s | ||
trampolines-i386-objc_msgSend_stret.s | ||
trampolines-i386.h | ||
trampolines-i386.m | ||
trampolines-internal.h | ||
trampolines-invoke.m | ||
trampolines-varargs.h | ||
trampolines-varargs.m | ||
trampolines-x86_64-asm.s | ||
trampolines-x86_64-objc_msgSend-copyframe.inc | ||
trampolines-x86_64-objc_msgSend-post.inc | ||
trampolines-x86_64-objc_msgSend-pre.inc | ||
trampolines-x86_64-objc_msgSend.s | ||
trampolines-x86_64-objc_msgSendSuper.s | ||
trampolines-x86_64-objc_msgSendSuper_stret.s | ||
trampolines-x86_64-objc_msgSend_stret.s | ||
trampolines-x86_64.h | ||
trampolines-x86_64.m | ||
trampolines.m | ||
xamarin-support.m |
README.md
Native runtime
This directory contains the native runtime for Xamarin.iOS and Xamarin.Mac.
Cooperative GC
See COOP.md
Generated code
A few files are generated automatically:
delegates.h|inc, Delegates.cs
These files contain the code required to glue the native runtime and the managed runtime.
mono-runtime.m, xamarin/mono-runtime.h
These files contain code that makes other code, consumers of the mono runtime, oblivious to whether the mono runtime is linked statically, dynamically, or using dlopen at runtime.
If you need to use a new function from the Mono headers, add it to exports.t4.
If you need a new enum / constant / typedef / etc, add it to mono-runtime.h.t4.
Shipped headers
These are the headers shipped with XI/XM (they're not for public consumption, but we need them to build generated code on customers machine, in particular main.m and registrar.m)
xamarin/runtime.h xamarin/trampolines.h xamarin/main.h xamarin/xamarin.h