Граф коммитов

14364 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 48cd88ba3e [jenkins] Add initial script to execute on jenkins. (#65) 2016-05-18 20:27:59 +02:00
Rolf Bjarne Kvinge 65c50daf22 [builds] Use the mono from watch-mono repo for bwatch-mono. (#64)
* [mk] Add watch-mono to the check-versions and reset-versions targets.

* [builds] Use the mono from watch-mono repo for bwatch-mono.
2016-05-18 19:33:04 +02:00
Rolf Bjarne Kvinge 7ae963b741 Bump maccore to get tests for exception marshaling. (#63) 2016-05-18 15:19:35 +02:00
Rolf Bjarne Kvinge 34656bfa76 [mk] Add watch-mono to the check-versions and reset-versions targets. (#62) 2016-05-18 14:29:02 +02:00
Sebastien Pouliot e726b5ab7e Bump maccore for fixing #3 of bug #41083 (#61)
[Xamarin.Hosting] Set a default simulator if nothing is provided to mlaunch. Fix #41083 part 3

    The string to represent a specific simulator is not something you can
    easily remember but it's often not very important.

    This will start the most basic simulator, by default, instead of throwing
    an NRE that does not mention a (now un-) required parameter is missing.

    > Failed to launch the simulator: Object reference not set to an instance of an object
    > error MT1008: Failed to launch the simulator: Object reference not set to an instance of an object

    https://bugzilla.xamarin.com/show_bug.cgi?id=41083
2016-05-17 20:37:16 -04:00
Sebastien Pouliot 2dd895e3fe [mtouch] Set default for dlsym to false for iOS (like tvOS and watchOS) (#60)
In cycle 7 we turned off, by default, the `dlsym` option (i.e. looking
up symbols for p/invoke) for tvOS and watchOS.

However we decided to wait for iOS to see if this caused issues for
existing code base. There has not been such reports (for tvOS) so,
for cycle 8, we'll turn it off (and use direct calls) for iOS.

If problems arise during the alpha/beta of C8 then we still can
revert this change easily.
2016-05-17 18:35:31 +02:00
Rolf Bjarne Kvinge 9e56c3ec3b Merge pull request #55 from rolfbjarne/exceptions
Implement support for exception marshaling.
2016-05-17 13:50:35 +02:00
Rolf Bjarne Kvinge cffc2e9181 Rewrite user-visible messages to use 'cooperative mode' instead of 'coop'.
This seems to be how we describe it publicly: http://tirania.org/blog/archive/2015/Dec-22.html
2016-05-17 11:30:38 +02:00
Rolf Bjarne Kvinge f7a5b7fb70 [runtime] Add docs about exception marshaling. 2016-05-17 11:24:04 +02:00
Rolf Bjarne Kvinge 2f2ac89da7 [mtouch] Remove misleading comment.
mtouch calculates the exact set of native functions to reference now,
so there's no need to sync anything.
2016-05-17 11:24:04 +02:00
Rolf Bjarne Kvinge 62cbe7e1f6 [mtouch] Fix logic to detect if simlauncher can be used. 2016-05-17 11:24:04 +02:00
Rolf Bjarne Kvinge f631069bbd [mmp] Only 64-bit apps have the dynamic objc_msgSend wrappers. 2016-05-17 11:24:04 +02:00
Rolf Bjarne Kvinge 7c1b81eb9d [runtime] Make sure the stack is correctly aligned to 16 bytes. 2016-05-17 11:24:03 +02:00
Rolf Bjarne Kvinge 53582429ec [runtime] Use the right condition when to reference libxammac.dylib vs __Internal. 2016-05-17 11:24:03 +02:00
Rolf Bjarne Kvinge f478657298 [runtime] Only insert dllmap for exception marshalling when the ObjC runtime supports zero-cost exceptions. 2016-05-17 11:24:03 +02:00
Rolf Bjarne Kvinge feb12f61b5 [runtime] mono_set_pending_exception is a private function in mono, so make it optional.
Otherwise Xamarin.Mac apps using the system mono will fail.
2016-05-17 11:24:03 +02:00
Rolf Bjarne Kvinge e51c48cda5 [runtime] Don't store xmm registers where we store other registers.
We store $ebx at $ebp-12:

	pushl	%ebx		# %ebp-12

so then storing xmm0 at $ebp-24:

	movaps	%xmm0, -24(%ebp)

would write 16 bytes between $ebp-24 and $ebp-8, thus overwriting
the place where we stored $ebx.

So allocate a bit more stack space and store the xmm registers
further 16 bytes down.
2016-05-17 11:24:02 +02:00
Rolf Bjarne Kvinge e8e8d6ea43 [runtime] Fix lookup of the inner exception when printing exception messages. 2016-05-17 11:24:02 +02:00
Rolf Bjarne Kvinge 79c68238ce [runtime] Don't use NSMethodSignature to compute frame size, it can't handle all method signature encodings.
In particular NSMethodSignature chokes on encodings like this:

	[NSDecimalNumber initWithDecimal:] = "@36@0:8{?=b8b4b1b1b18[8S]}16"

with an exception:

	NSInvalidArgumentException Reason: +[NSMethodSignature signatureWithObjCTypes:]: unsupported type encoding spec '{?}'

so implement our own code to calculate the frame size.
2016-05-17 11:24:02 +02:00
Rolf Bjarne Kvinge 3ac40ab007 [runtime] Improve a few assertion messages to include more information. 2016-05-17 11:24:02 +02:00
Rolf Bjarne Kvinge 515ed012c1 Add libmonotouch.csproj / xamios.csproj to Xamarin.iOS.sln. 2016-05-17 11:23:48 +02:00
Rolf Bjarne Kvinge 1ef9dfb811 [runtime] Make sure the movaps instruction only accesses 16-byte aligned memory addresses. 2016-05-17 11:23:48 +02:00
Rolf Bjarne Kvinge 1f1f6991a3 Implement support for exception marshalling. 2016-05-17 11:23:48 +02:00
Rolf Bjarne Kvinge 86c73f8fc0 Refactor static registrar to produce both a header and a source file.
This way we can re-use the header in other files.
2016-05-17 11:23:47 +02:00
Rolf Bjarne Kvinge 3903e01076 [mmp/mtouch] Add a Driver.WriteIfDifferent overload that takes a byte array. 2016-05-17 11:20:26 +02:00
Rolf Bjarne Kvinge 9b4f7532ab Add runtime variable to specify the exception marshalling modes, and mmp/mtouch options to select it. 2016-05-17 11:20:26 +02:00
Rolf Bjarne Kvinge b8abf3db01 Add runtime variable to specify if the Coop GC should be used, and a mmp/mtouch option to select it.
The mmp/mtouch option is hidden for now, since it's not actually possible
to select the Coop GC yet.
2016-05-17 11:20:26 +02:00
Rolf Bjarne Kvinge ac705ce505 [runtime] Make the existing trampolines exception-aware.
This is required so that the Objective-C exception
unwinder can properly unwind through these trampolines.
2016-05-17 11:20:26 +02:00
Rolf Bjarne Kvinge 50c65cf90b [runtime] Extract logic in xamarin_unhandled_exception_handler to collect exception information to a separate function.
So that we can later re-use this logic somewhere else.
2016-05-17 11:20:26 +02:00
Sebastien Pouliot cb90ae8a1f Merge pull request #56 from rolfbjarne/watch-mono
Use a separate mono clone for watchOS.
2016-05-16 17:49:27 -04:00
Martin Baulig 47d95516da Merge pull request #58 from xamarin/martin-mono-bump
Bump mono to mono-4.5.0-branch commit 9c18adad5b816f297b8c5b20e600888…
2016-05-16 16:39:27 -04:00
Martin Baulig ffd8a9939a Bump mono to mono-4.5.0-branch commit 9c18adad5b816f297b8c5b20e60088843697abab.
This gives us all the recent AppleTls fixes.

commit 9c18adad5b816f297b8c5b20e60088843697abab
Author: Martin Baulig <martin.baulig@xamarin.com>
Date:   Mon May 16 14:43:05 2016 -0400

    [corlib]: Update X509Helper.Apple.cs.
2016-05-16 15:37:39 -04:00
Rolf Bjarne Kvinge 085b79c8cc [src] Fix path to watchOS-related assemblies. 2016-05-16 14:18:27 +02:00
Rolf Bjarne Kvinge 7890768bc0 [system-dependencies] Ensure xcode-select points to the Xcode we care about. (#53) 2016-05-16 08:13:55 -04:00
Rolf Bjarne Kvinge a4dffa6a78 [runtime] Disable the GC pump for Xamarin.Mac. (#52)
It seems it prevents the app from exiting; Mono will wait
for the GC pump thread to exit, which never happens.

The GC pump was never enabled for Xamarin.Mac apps
until recently (d9677714a), so this will just revert
to the previous behavior.

    thread 1: tid = 0x2ab2bf5, 0x00007fff97815eb2 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'tid_50f', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
      frame 0: 0x00007fff97815eb2 libsystem_kernel.dylib`__psynch_cvwait + 10
      frame 1: 0x00007fff89015150 libsystem_pthread.dylib`_pthread_cond_wait + 767
      frame 2: 0x000000010ceb1283 MobileTestApp`_wapi_handle_timedwait_signal_handle [inlined] mono_os_cond_wait(cond=<unavailable>, mutex=<unavailable>) + 8 at mono-os-mutex.h:107 [opt]
      frame 3: 0x000000010ceb127b MobileTestApp`_wapi_handle_timedwait_signal_handle [inlined] mono_os_cond_timedwait(cond=<unavailable>, mutex=0x00007fb085016210, timeout_ms=<unavailable>) at mono-os-mutex.h:122 [opt]
      frame 4: 0x000000010ceb127b MobileTestApp`_wapi_handle_timedwait_signal_handle(handle=0x0000000000000400, timeout=<unavailable>, alertable=1, poll=0, alerted=0x00007fff52fb4984) + 1003 at handles.c:1555 [opt]
      frame 5: 0x000000010cec3d87 MobileTestApp`wapi_WaitForMultipleObjectsEx(numobjects=2, handles=<unavailable>, waitall=0, timeout=4294967295, alertable=<unavailable>) + 1527 at wait.c:615 [opt]
      frame 6: 0x000000010ce692b6 MobileTestApp`mono_thread_manage + 57 at threads.c:2956 [opt]
      frame 7: 0x000000010ce6927d MobileTestApp`mono_thread_manage + 301 at threads.c:3162 [opt]
      frame 8: 0x000000010ccbb533 MobileTestApp`mono_main(argc=<unavailable>, argv=<unavailable>) + 7987 at driver.g.c:2181 [opt]
      frame 9: 0x000000010cc61c67 MobileTestApp`main(argc=1, argv=0x00007fff52fb5268) + 775 at launcher.m:562
      frame 10: 0x000000010cc63150 MobileTestApp`start + 52

    thread 2: tid = 0x2ab2bf7, 0x00007fff97816ff6 libsystem_kernel.dylib`kevent_qos + 10, queue = 'com.apple.libdispatch-manager'
      frame 0: 0x00007fff97816ff6 libsystem_kernel.dylib`kevent_qos + 10
      frame 1: 0x00007fff88f18099 libdispatch.dylib`_dispatch_mgr_invoke + 216
      frame 2: 0x00007fff88f17d01 libdispatch.dylib`_dispatch_mgr_thread + 52

    thread 3: tid = 0x2ab2bfa, 0x00007fff97815eb2 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'SGen worker'
      frame 0: 0x00007fff97815eb2 libsystem_kernel.dylib`__psynch_cvwait + 10
      frame 1: 0x00007fff89015150 libsystem_pthread.dylib`_pthread_cond_wait + 767
      frame 2: 0x000000010ceab31c MobileTestApp`thread_func [inlined] mono_os_cond_wait(mutex=0x000000010d02e190) + 15 at mono-os-mutex.h:107 [opt]
      frame 3: 0x000000010ceab30d MobileTestApp`thread_func(thread_data=0x0000000000000000) + 333 at sgen-thread-pool.c:110 [opt]
      frame 4: 0x00007fff89014c13 libsystem_pthread.dylib`_pthread_body + 131
      frame 5: 0x00007fff89014b90 libsystem_pthread.dylib`_pthread_start + 168
      frame 6: 0x00007fff89012375 libsystem_pthread.dylib`thread_start + 13

    thread 4: tid = 0x2ab2bfb, 0x00007fff978103c2 libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'Finalizer'
      frame 0: 0x00007fff978103c2 libsystem_kernel.dylib`semaphore_wait_trap + 10
      frame 1: 0x000000010cdb847b MobileTestApp`finalizer_thread [inlined] mono_os_sem_wait(flags=MONO_SEM_FLAGS_ALERTABLE) + 11 at mono-os-semaphore.h:72 [opt]
      frame 2: 0x000000010cdb8470 MobileTestApp`finalizer_thread + 11 at mono-coop-semaphore.h:40 [opt]
      frame 3: 0x000000010cdb8465 MobileTestApp`finalizer_thread(unused=<unavailable>) + 181 at gc.c:770 [opt]
      frame 4: 0x000000010ce6bb05 MobileTestApp`start_wrapper [inlined] start_wrapper_internal + 548 at threads.c:738 [opt]
      frame 5: 0x000000010ce6b8e1 MobileTestApp`start_wrapper(data=<unavailable>) + 49 at threads.c:785 [opt]
      frame 6: 0x000000010ced50f6 MobileTestApp`inner_start_thread(arg=<unavailable>) + 406 at mono-threads-posix.c:92 [opt]
      frame 7: 0x00007fff89014c13 libsystem_pthread.dylib`_pthread_body + 131
      frame 8: 0x00007fff89014b90 libsystem_pthread.dylib`_pthread_start + 168
      frame 9: 0x00007fff89012375 libsystem_pthread.dylib`thread_start + 13

    thread 5: tid = 0x2ab2c07, 0x00007fff97816206 libsystem_kernel.dylib`__semwait_signal + 10, name = 'tid_320b'
      frame 0: 0x00007fff97816206 libsystem_kernel.dylib`__semwait_signal + 10
      frame 1: 0x00007fff82df1d17 libsystem_c.dylib`nanosleep + 199
      frame 2: 0x00007fff82df1c0a libsystem_c.dylib`usleep + 54
      frame 3: 0x000000010cc5bc60 MobileTestApp`pump_gc(context=0x0000000000000000) + 64 at runtime.m:904
      frame 4: 0x00007fff89014c13 libsystem_pthread.dylib`_pthread_body + 131
      frame 5: 0x00007fff89014b90 libsystem_pthread.dylib`_pthread_start + 168
      frame 6: 0x00007fff89012375 libsystem_pthread.dylib`thread_start + 13
2016-05-16 08:12:49 -04:00
Vincent Dondain 39623b6a70 Update README.md (#54)
- Add description of the frameworks.
  (copied from https://developer.xamarin.com/guides/ios/getting_started/)
- Mention tvOS and watchOS.
2016-05-16 13:47:28 +02:00
Rolf Bjarne Kvinge 71b04db2ed [builds] There's no libmono-profiler-log.dylib anymore on watchOS.
Mono disabled building the log profiler as a dynamic library [1],
so don't try to install it.

[1] cfd9870f83
2016-05-16 13:44:03 +02:00
Rolf Bjarne Kvinge a7f2dd54b5 [builds] Use libmono-profiler-log-static.a instead of libmono-profiler-log.a.
This was already done for iOS device builds [1], this does the same thing for
all the other builds (simulator, tvOS, watchOS).

[1] f773a69bed
2016-05-16 13:42:23 +02:00
Rolf Bjarne Kvinge 69fe27aafa [builds] Build tools64 completely before watchbcl.
watchbcl uses mdb rebase from tools64, but adding a more "correct"
dependency when the mdb rebase occurs causes tools64 to be built
twice simultaneously (probably because we use submakes, so a different
make process also tries to build tools64).

So instead use a bigger hammer and just build tools64 completely
before building watchbcl.
2016-05-16 13:39:17 +02:00
Rolf Bjarne Kvinge d42474098f [builds] Use the right aot offsets tool for watchOS. 2016-05-16 12:14:36 +02:00
Rolf Bjarne Kvinge 611b35c910 [builds] tools64 shouldn't build the watchOS BCL anymore. 2016-05-16 11:10:51 +02:00
Rolf Bjarne Kvinge 9c77afa4d7 Use the watchOS mono submodule. 2016-05-16 11:06:03 +02:00
Rolf Bjarne Kvinge 0d63ee72d1 Merge pull request #51 from spouliot/bug41083
[mtouch] Look where XS 6.1+ has installed mlaunch. Fixes part of #41083
2016-05-16 10:38:40 +02:00
Sebastien Pouliot 61b3006b84 [mtouch] Fix --sdkroot not to report a default to /Developer/. Fixes part of #41083
Also bump maccore so `mlaunch` behave like `mtouch` wrt --sdkroot

https://bugzilla.xamarin.com/show_bug.cgi?id=41083
2016-05-14 11:11:40 -04:00
Manuel de la Pena ee07bcf051 Merge pull request #47 from mandel-macaque/bug-24078-retake
[Fix] Fix bug 24078 by adding the required attrs to generate the events.
2016-05-14 12:50:34 +02:00
Manuel de la Pena 173f7e4891 [Fix] Fix bug 24078 by adding the required attrs to generate the events. 2016-05-14 12:47:46 +02:00
Sebastien Pouliot 448a3cf1d6 [mtouch] Look where XS 6.1+ has installed mlaunch. Fixes part of #41083
The initial location was incorrectly guessed (before XS added it).

$ mtouch --launchsim tests//monotouch-test/bin/iPhoneSimulator/Debug/monotouchtest.app --sdkroot /Applications/Xcode73.app/Contents/Developer/
error MT0092: Could not find 'mlaunch'.

https://bugzilla.xamarin.com/show_bug.cgi?id=41083
2016-05-13 16:29:41 -04:00
Rolf Bjarne Kvinge 5490088c3f Add a separate submodule tracking mono/master for watchOS. 2016-05-13 17:41:48 +02:00
Rolf Bjarne Kvinge d9677714ad [runtime] Re-enable the gc pump by default for debug simulator/mac builds. (#50) 2016-05-13 09:49:08 -04:00
Rolf Bjarne Kvinge 0d376c521a [mtouch] Properly link with CoreAudioKit when not using simlauncher. (#49)
Also bump maccore to get new test.

commit xamarin/maccore@eb9c34d875
Author: Rolf Bjarne Kvinge <rolf@xamarin.com>
Date:   Fri May 13 12:46:04 2016 +0200

    [monotouch-test] Add test to ensure mtouch properly links with CoreAudioKit when not using simlauncher.
2016-05-13 08:23:49 -04:00