Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortherzok <marius.ungureanu@xamarin.com>2019-10-23 00:35:44 +0300
committertherzok <marius.ungureanu@xamarin.com>2019-10-23 00:35:44 +0300
commit122ebb92cd99b7c4dacb1b362d892e7143254cb3 (patch)
tree614d86d499c3be95842c2697fb96ebec81e9bd9a /main/build
parentdc4ad691d58fa720e3a65ba04b478c1a6447cad3 (diff)
Only add crasher in debug builds
Diffstat (limited to 'main/build')
-rw-r--r--main/build/MacOSX/Makefile.am3
-rw-r--r--main/build/MacOSX/monostub.mm4
2 files changed, 5 insertions, 2 deletions
diff --git a/main/build/MacOSX/Makefile.am b/main/build/MacOSX/Makefile.am
index 4757765aa1..d821f3e673 100644
--- a/main/build/MacOSX/Makefile.am
+++ b/main/build/MacOSX/Makefile.am
@@ -13,6 +13,7 @@ MONOSTUB_STATIC_LINK=$(EXTERNAL)/Xamarin.Mac.registrar.full.a
if !RELEASE_BUILDS
HYBRID_SUSPEND_ABORT=-DHYBRID_SUSPEND_ABORT
+ENABLE_DEBUG_CRASHER=-DENABLE_DEBUG_CRASHER
endif
#SDK_PATH=$(shell xcrun --sdk macosx10.8 --show-sdk-path)
@@ -49,7 +50,7 @@ dmg: render.exe app
./make-dmg-bundle.sh
monostub.o: monostub.mm $(MONOSTUB_EXTRA_SOURCEFILES)
- g++ -g $(HYBRID_SUSPEND_ABORT) -c -Wall -m64 -o $@ monostub.mm
+ g++ -g $(HYBRID_SUSPEND_ABORT) $(ENABLE_DEBUG_CRASHER) -c -Wall -m64 -o $@ monostub.mm
monostub-nogui.o: monostub.mm $(MONOSTUB_EXTRA_SOURCEFILES)
g++ -g $(HYBRID_SUSPEND_ABORT) -DNOGUI -c -Wall -m64 -o $@ monostub.mm
diff --git a/main/build/MacOSX/monostub.mm b/main/build/MacOSX/monostub.mm
index c99e2cbb8c..9fccbe0a5b 100644
--- a/main/build/MacOSX/monostub.mm
+++ b/main/build/MacOSX/monostub.mm
@@ -227,11 +227,13 @@ load_xammac()
}
}
-extern "C" void crash_me()
+#if ENABLE_DEBUG_CRASHER
+extern "C" void debug_trigger_sigsegv()
{
void *p = (void*)0x12345;
*(int *)p = 0;
}
+#endif
int
main (int argc, char **argv)