From: Holger Schemel Date: Fri, 19 Feb 2021 17:10:02 +0000 (+0100) Subject: added support for using LLDB instead of GDB when debugging on Mac X-Git-Tag: 4.2.3.0~1 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=881aea4bdbd831b4c5833a697d64b0a4bd7962ee;p=rocksndiamonds.git added support for using LLDB instead of GDB when debugging on Mac --- diff --git a/src/Makefile b/src/Makefile index 39029a0c..f40ada29 100644 --- a/src/Makefile +++ b/src/Makefile @@ -39,6 +39,8 @@ WINDRES = windres CONVERT_ICON_ARGS = -transparent black -background transparent +DEBUGGER = gdb -batch -ex "run" -ex "bt" + PROGBASE = rocksndiamonds PROGNAME = ../$(PROGBASE) @@ -66,8 +68,9 @@ RANLIB = emranlib STRIP = true endif -ifdef BUILD_DIST # distribution build ifeq ($(shell uname -s),Darwin) # compiling on Mac OS X +DEBUGGER = lldb --batch -o "run" -k "bt" -k "quit" +ifdef BUILD_DIST # distribution build MAC_TARGET_VERSION_MIN = 10.7 EXTRA_FLAGS_MAC = -mmacosx-version-min=$(MAC_TARGET_VERSION_MIN) EXTRA_CFLAGS = $(EXTRA_FLAGS_MAC) @@ -354,7 +357,7 @@ run: cd .. && ./$(PROGBASE) --verbose gdb: - cd .. && gdb -batch -x GDB_COMMANDS ./$(PROGBASE) + cd .. && $(DEBUGGER) $(PROGBASE) valgrind: cd .. && valgrind -v --leak-check=yes ./$(PROGBASE) 2> valgrind.out