[XM] Add support for disabling lldb attach on crash (#670)

- https://bugzilla.xamarin.com/show_bug.cgi?id=23482
This commit is contained in:
Chris Hamons 2016-08-25 13:06:38 -05:00 коммит произвёл GitHub
Родитель 11c4f6bdd9
Коммит 1c6e1959b7
4 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -352,6 +352,11 @@ update_environment (xamarin_initialize_data *data)
}
}
#endif
if (xamarin_disable_lldb_attach) {
// Unfortunately the only place to set debug_options.no_gdb_backtrace is in mini_parse_debug_option
// So route through MONO_DEBUG
setenv ("MONO_DEBUG", "no-gdb-backtrace", 0);
}
}
static void

Просмотреть файл

@ -46,6 +46,7 @@ bool xamarin_debug_mode = true;
#else
bool xamarin_debug_mode = false;
#endif
bool xamarin_disable_lldb_attach = false;
// true if either OldDynamic or OldStatic (since the static registrar still needs
// a dynamic registrar available too).
bool xamarin_use_old_dynamic_registrar = false;

Просмотреть файл

@ -42,6 +42,7 @@ extern bool mono_use_llvm; // this is defined inside mono
extern bool xamarin_use_new_assemblies;
extern bool xamarin_gc_pump;
extern bool xamarin_debug_mode;
extern bool xamarin_disable_lldb_attach;
extern bool xamarin_use_old_dynamic_registrar;
extern bool xamarin_use_il_registrar;
extern bool xamarin_init_mono_debug;

Просмотреть файл

@ -81,6 +81,7 @@ namespace Xamarin.Bundler {
static bool? thread_check = null;
static string link_flags = null;
static LinkerOptions linker_options;
static bool disable_lldb_attach = false;
static bool arch_set = false;
static string arch = "i386";
@ -287,6 +288,7 @@ namespace Xamarin.Bundler {
{ "http-message-handler=", "Specify the default HTTP Message Handler", v => { http_message_provider = v; }},
{ "extension", "Specifies an app extension", v => is_extension = true },
{ "allow-unsafe-gac-resolution", "Allow MSBuild to resolve from the System GAC", v => {} , true }, // Used in Xamarin.Mac.XM45.targets and must be ignored here. Hidden since it is a total hack. If you can use it, you don't need support
{ "disable-lldb-attach=", "Disable automatic lldb attach on crash", v => disable_lldb_attach = ParseBool (v, "disable_lldb_attach")},
};
AddSharedOptions (os);
@ -908,6 +910,8 @@ namespace Xamarin.Bundler {
sw.WriteLine ("\txamarin_use_il_registrar = {0};", registrar == RegistrarMode.IL ? "true" : "false");
sw.WriteLine ("\txamarin_marshal_managed_exception_mode = MarshalManagedExceptionMode{0};", App.MarshalManagedExceptions);
sw.WriteLine ("\txamarin_marshal_objectivec_exception_mode = MarshalObjectiveCExceptionMode{0};", App.MarshalObjectiveCExceptions);
if (disable_lldb_attach)
sw.WriteLine ("\txamarin_disable_lldb_attach = true;");
sw.WriteLine ();
if (Driver.registrar == RegistrarMode.Static)
sw.WriteLine ("\txamarin_create_classes ();");