From 881aea4bdbd831b4c5833a697d64b0a4bd7962ee Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Fri, 19 Feb 2021 18:10:02 +0100 Subject: [PATCH] added support for using LLDB instead of GDB when debugging on Mac --- src/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.34.1