From e0510e4c926c48e89aee352ac09af007d1bec5d1 Mon Sep 17 00:00:00 2001 From: norly Date: Mon, 11 Feb 2013 01:08:31 +0000 Subject: [PATCH] Makefile: debug option - attach to running instance --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index df5f59f..726b92a 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,10 @@ LDFLAGS := -lelf default: $(EXE) +.PHONY: debug +debug: $(EXE) + gdb $(EXE) $(shell ps -e | sed "s/^ *\([0-9]\+\) .*$(PROJ).*$$/\1/g;te;d;:e") + $(EXE): $(OBJS) @if [ ! -d $(BUILDDIR) ] ; then echo "Error: Build dir '$(BUILDDIR)' does not exist." ; false ; fi -- 2.30.2