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

22 Коммитов

Автор SHA1 Сообщение Дата
Bernhard Urban 15c9275b43 [runtime] set mono_set_crash_chaining (#2184)
it was introduced a while ago for Xamarin-Android:

8ffc4070a9

8d7cc2b800/src/monodroid/jni/monodroid-glue.c (L2840)

it potentially helps to get even better crash reports.
2017-06-27 17:40:30 -04:00
Rolf Bjarne Kvinge 132752289e [runtime] Don't ignore any return values. (#2148) 2017-05-31 19:04:55 +02:00
Rolf Bjarne Kvinge ad3a4a12eb [runtime] Store the launch mode in a static variable.
Store the launch mode in a static variable instead of storing if we're an
extension (since the launch mode also contains that information).

Also pass the launch mode around in Xamarin.Mac's initialization data.
2017-05-09 08:12:39 +02:00
Rolf Bjarne Kvinge 1afae37c7f [runtime] Add support for initializing in an embedder mode. 2017-04-18 11:13:42 +02:00
Rolf Bjarne Kvinge 3ea9fddc7b [runtime] Check in container app's root directory for assemblies.
If an extension is sharing code with the container app, then assemblies may be
placed in:

* The container app's Framework directory (for assemblies whose code is
  shared, and the build action is 'framework'). We already handle this case.
* The container app's root directory (for assemblies whose code is shared, and
  the build action is not 'framework'). This case we didn't handle, and we're
  now fixing it.
* In the extension (for assemblies whose code is not shared). We already
  handle this case.
2017-02-10 16:39:13 +01:00
Rolf Bjarne Kvinge dea33a6770 [runtime] Lookup assembly-related resources from parent bundles as well.
Add support for finding assembly-related resources (debug files, config files,
satellite assemblies, aotdata files, etc) in multiple locations:

* The bundle's root directory.
* A pointer-size specific size directory (.monotouch-32|64)
* A framework's MonoBundle directory (and the framework may not be named after
  the assembly, which means it's not necessarily possible to deduce the
  framework's name at runtime).
* In a container bundle.

Some files may also have an arch-specific suffix.
2017-02-10 14:29:10 +01:00
Rolf Bjarne Kvinge 7ce53a98e8 [runtime] Make internal function static. 2017-02-10 14:29:09 +01:00
Rolf Bjarne Kvinge ddedfc2798 [mtouch] Make the architecture a suffix instead of infix for aotdata filenames.
Make the architecture a suffix instead of infix for aotdata filenames so that
it's easier to compute the filename from the assembly name without passing
printf-style format strings around.
2017-02-10 14:29:09 +01:00
Rolf Bjarne Kvinge a520c5077a [runtime] Use safer versions of strncpy/strncat/strcat. (#1434)
The length argument for `strncpy` specifies how many characters to copy, not
the length of the target string, which makes our usage incorrect.

Fix our usage, and use the `strlcpy` variant instead, which takes the length
of the target string.

And use `strlcat` instead of `strcat`.
2017-01-04 18:10:47 +01:00
Rolf Bjarne Kvinge ea24c1d3b4 [runtime] Remove unused variable. (#1221) 2016-11-21 14:38:14 +01:00
Rolf Bjarne Kvinge 71a578ee38 [runtime] Remove deprecated and ignored mono option. (#1019)
Setting this option prints this to stdout:

> Mono Warning: option gen-compact-seq-points is deprecated.

and it's ignored, so just don't set this option.
2016-10-27 16:04:19 -04:00
Rolf Bjarne Kvinge 7666748486 [runtime] Make startup profiling code compile. (#1001) 2016-10-18 21:40:42 -04:00
Rolf Bjarne Kvinge cfb84f6e17 [runtime] Use printf on watchOS, NSLog doesn't shown up (by default) (#772)
* [runtime] Use printf on watchOS, NSLog doesn't shown up (by default).

* [runtime] Use a wrapper function for logging.

So that we can chose between printf and NSLog at runtime,
depending on where we're running.
2016-09-06 16:55:23 -04:00
Rolf Bjarne Kvinge 1c8a8db412 [runtime] Make sure to call mono_gc_init_finalizer_thread for watchOS. Fixes #42780. (#504)
https://bugzilla.xamarin.com/show_bug.cgi?id=42780
2016-07-28 09:56:55 +02:00
Rolf Bjarne Kvinge 774fdf80b6 [runtime] Set base directory and config file name for extensions. Fixes #42784. (#493)
The base directory and config file name is normally set automatically
when we ask Mono to execute the Main function, but in the case of extensions,
there is no Main function, so these values are not set, causing some
features (reflection-only assembly load) to not work correctly.

https://bugzilla.xamarin.com/show_bug.cgi?id=42784
2016-07-26 11:39:33 -04:00
Rolf Bjarne Kvinge 2d28e24837 [runtime] Handle any exceptions whenever we return from managed code. 2016-06-08 20:05:54 +02:00
Rolf Bjarne Kvinge 5e302f9719 [runtime] Catch and process managed exceptions that are thrown in reverse P/Invoke (delegate) callbacks. 2016-06-08 20:05:54 +02:00
Zoltan Varga 5270b63cee [runtime] Use the same coop gc macro names as mono master does. 2016-05-26 17:47:10 +02:00
Rolf Bjarne Kvinge af0d01c93a Initial review pass for COOP for watchOS. 2016-05-26 17:47:10 +02:00
Rolf Bjarne Kvinge 297b6a24f3 [runtime] Ignore SIGPIPE for watchOS.
Usually mono does this for other apps, but not for watchOS (where mono doesn't
use signals at all).

watchOS can still raise signals though, so we need to ignore at least SIGPIPE.
2016-05-26 17:47:10 +02:00
Rolf Bjarne Kvinge a5c7575387 [runtime] Remove debug printf I haven't figured out how to fix. (#85)
As far as I can tell there are no memory warnings on watchOS,
but I can't find any documentation saying that either.
2016-05-26 13:11:28 +02:00
Rolf Bjarne Kvinge ac418df815 Build our runtime. 2016-04-24 14:47:24 -04:00