Skip to content
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
2 changes: 2 additions & 0 deletions runtime/launcher.m
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,8 @@
// The launch code here is publicly documented in xamarin/launch.h
// The numbers in the comments refer to numbers in xamarin/launch.h.

xamarin_is_extension = is_extension;

#ifndef SYSTEM_LAUNCHER
if (xammac_setup ()) {
data->exit_code = -1;
Expand Down
7 changes: 5 additions & 2 deletions runtime/monotouch-debug.m
Original file line number Diff line number Diff line change
Expand Up @@ -561,8 +561,11 @@ void monotouch_configure_debugging ()

#if MONOTOUCH && (defined(__i386__) || defined (__x86_64__))
// Try to read shared memory as well
key_t shmkey = ftok ("/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch", 0);
if (shmkey == -1) {
key_t shmkey;
if (!xamarin_is_extension) {
// Don't read shared memory in normal apps, because we're always able to pass
// the debug data (host/port) using either command-line arguments or environment variables
} else if ((shmkey = ftok ("/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch", 0)) == -1) {
LOG (PRODUCT ": Could not create shared memory key: %s\n", strerror (errno));
} else {
int shmsize = 1024;
Expand Down
2 changes: 2 additions & 0 deletions runtime/monotouch-main.m
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ - (void) memoryWarning: (NSNotification *) sender
patch_sigaction ();
#endif

xamarin_is_extension = is_extension;

memset (managed_argv, 0, sizeof (char*) * (argc + 2));
managed_argv [0] = "monotouch";

Expand Down
1 change: 1 addition & 0 deletions runtime/runtime.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
#endif
enum MarshalObjectiveCExceptionMode xamarin_marshal_objectivec_exception_mode = MarshalObjectiveCExceptionModeDefault;
enum MarshalManagedExceptionMode xamarin_marshal_managed_exception_mode = MarshalManagedExceptionModeDefault;
bool xamarin_is_extension = false;

/* Callbacks */

Expand Down
1 change: 1 addition & 0 deletions runtime/xamarin/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ extern const char *xamarin_arch_name;
extern bool xamarin_is_gc_coop;
extern enum MarshalObjectiveCExceptionMode xamarin_marshal_objectivec_exception_mode;
extern enum MarshalManagedExceptionMode xamarin_marshal_managed_exception_mode;
extern bool xamarin_is_extension;

#ifdef MONOTOUCH
extern NSString* xamarin_crashlytics_api_key;
Expand Down