From 160ef548f8c2031a6f82f1d74ec0d4483b6f9cd1 Mon Sep 17 00:00:00 2001 From: Takuo Yonezawa Date: Tue, 25 Oct 2016 16:31:40 +0900 Subject: [PATCH 1/2] make: use LLDB if GDB is not available --- boards/native/Makefile.include | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/boards/native/Makefile.include b/boards/native/Makefile.include index 2d6ac38eb0..848a0f03ff 100644 --- a/boards/native/Makefile.include +++ b/boards/native/Makefile.include @@ -36,7 +36,7 @@ export OFLAGS = endif endif -export DEBUGGER = gdb +export DEBUGGER ?= $(shell command -v $(PREFIX)gdb gdb lldb | head -n 1) export TERMPROG ?= $(ELF) export FLASHER = true export VALGRIND ?= valgrind @@ -95,7 +95,11 @@ endif export TERMFLAGS := $(PORT) $(TERMFLAGS) export ASFLAGS = +ifeq ($(shell basename $(DEBUGGER)),lldb) +export DEBUGGER_FLAGS = -- $(ELF) $(TERMFLAGS) +else export DEBUGGER_FLAGS = -q --args $(ELF) $(TERMFLAGS) +endif term-valgrind: export VALGRIND_FLAGS ?= \ --leak-check=full \ --track-origins=yes \ From f2ea42c043a6a47fce6067c688c0d3052d81bda7 Mon Sep 17 00:00:00 2001 From: Takuo Yonezawa Date: Thu, 27 Oct 2016 14:50:16 +0900 Subject: [PATCH 2/2] NEED SQUASHING make: use LLDB on Darwin --- boards/native/Makefile.include | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/boards/native/Makefile.include b/boards/native/Makefile.include index 848a0f03ff..7ed34b4fe1 100644 --- a/boards/native/Makefile.include +++ b/boards/native/Makefile.include @@ -36,7 +36,11 @@ export OFLAGS = endif endif -export DEBUGGER ?= $(shell command -v $(PREFIX)gdb gdb lldb | head -n 1) +ifeq ($(shell uname -s),Darwin) +export DEBUGGER ?= lldb +else +export DEBUGGER ?= gdb +endif export TERMPROG ?= $(ELF) export FLASHER = true export VALGRIND ?= valgrind