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

6251 Коммитов

Автор SHA1 Сообщение Дата
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
Jeffrey Stedfast 87153e47c0 [msbuild] Don't treat unsupported iCloud entitlements as errors in the build (#46)
Fixes bug #40961
2016-05-13 11:19:49 +02:00
Manuel de la Pena 839304ae3b Bump maccore version. 2016-05-12 23:10:39 +02:00
Manuel de la Pena 96a596f12e Merge pull request #43 from mandel-macaque/generator-ignore-methods
[Fix] Update the generator to help fix 24078 by ignoring certain tagged methods.
2016-05-12 23:06:52 +02:00
Jeffrey Stedfast 7ee37c1803 [msbuild] Link storyboards as part of the IBTool task if Xcode >= 7.0
Fixes issue #40583
2016-05-12 15:24:54 -04:00
Manuel de la Pena fc472cc583 [Fix] Update the generator to help fix 24078 by ignoring certain tagged methods. 2016-05-12 16:34:03 +02:00
Jeffrey Stedfast 746164e515 Merge pull request #42 from VincentDondain/master
[msbuild/tests] Add ValidateAppBundleTaskTests
2016-05-11 17:51:09 -04:00
Vincent Dondain af283be95d [msbuild/tests] Add ValidateAppBundleTaskTests
Includes regression test for bug #38673:
https://bugzilla.xamarin.com/show_bug.cgi?id=38673

Description:
"Validate that CFBundleVersion and CFBundleShortVersionString
match across main app and all extensions".
2016-05-11 20:24:07 +02:00
Jeffrey Stedfast 0dc4cd2413 [msbuild] reverted accidental debug logging 2016-05-11 12:07:24 -04:00
Jeffrey Stedfast 351d429273 [msbuild] Fixed Optimize metadata parsing logic for BundleResources
Fixes bug #41019
2016-05-11 12:03:15 -04:00
Rolf Bjarne Kvinge fab94ff5c9 [runtime] Pass -no_warning_for_no_symbols to libtool/ranlib to silence the corresponding warning. (#41) 2016-05-11 10:17:03 -04:00
Rolf Bjarne Kvinge 0e7952053c [mmp] References are optional when not linking the app, so don't show errors in that case. Fixes #40786. (#40)
It is apparently common to have references to assemblies that can't
be resolved when building apps with the linker disabled, so we need
to support that.

So add a custom reference loading step that only shows a warning
for unresolvable assemblies.

Also bump maccore to add a test.

commit xamarin/maccore@190c67d855
Author: Rolf Bjarne Kvinge <rolf@xamarin.com>
Date:   Tue May 10 18:14:04 2016 +0200

    [tests] Add test case for bug #40786.

    https://bugzilla.xamarin.com/show_bug.cgi?id=40786

https://bugzilla.xamarin.com/show_bug.cgi?id=40786
2016-05-11 10:16:30 -04:00
Rolf Bjarne Kvinge 01259ce9e3 Bump to mono 4.4 to get a 64-bit capable mono. (#39)
* [system-dependencies] Teach script about how to get the revision part of the mono version.

* Bump to mono 4.4 to get a 64-bit capable mono.

mdtool from Xamarin Studio 6.0 is a 64-bit process,
and thus requires a 64-bit capable system mono.
2016-05-11 10:14:52 -04:00
Rolf Bjarne Kvinge 25597f8ed6 Bump min Xamarin Studio version to latest alpha. (#38)
To get a version of mdtool that works without any Xamarin.Mac
licenses.

Also bump maccore to run the mmp regression tests now that
we have a working Xamarin Studio.

commit xamarin/maccore@9a5e6f02f3
Author: Rolf Bjarne Kvinge <rolf@xamarin.com>
Date:   Tue May 10 18:20:48 2016 +0200

    [tests] There is now a released version of Xamarin Studio whose mdtool doesn't care about the XM license, so we can run the mmp regression tests again.
2016-05-10 14:38:38 -04:00