diff --git a/Makefile b/Makefile
index f96a98d..5ed5077 100644
--- a/Makefile
+++ b/Makefile
@@ -70,10 +70,10 @@ gcovr:
if [ -d "$$HOME/Downloads/c3_gcovr" ]; then bin/gcovr-to-downloads; fi
gdb_ic3: debug
- if [ -f ic3/ic3.debug.core ]; then gdb ic3/ic3.debug ic3/ic3.debug.core; else gdb ic3/ic3.debug; fi
+ ${MAKE} -C ic3 gdb_ic3
gdb_test: debug
- if [ -f test/libc3_test.debug.core ]; then gdb test/libc3_test.debug test/libc3_test.debug.core; else gdb test/libc3_test.debug; fi
+ ${MAKE} -C test gdb_test
ic3_gcovr:
${MAKE} clean_cov
diff --git a/ic3/Makefile b/ic3/Makefile
index a66d233..8929ecd 100644
--- a/ic3/Makefile
+++ b/ic3/Makefile
@@ -41,6 +41,9 @@ distclean:
gcovr:
gcovr --gcov-executable ${GCOV} --html-details ic3.html
+gdb_ic3: debug
+ if [ -f ic3.debug.core ]; then gdb ic3.debug ic3.debug.core; else gdb ic3.debug; fi
+
.PHONY: all asan cov debug clean clean_cov distclean
include config.mk
diff --git a/test/Makefile b/test/Makefile
index 06f99a5..4f542fd 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -41,6 +41,9 @@ distclean:
gcovr:
gcovr --gcov-executable ${GCOV} --html-details test.html
+gdb_test: debug
+ if [ -f libc3_test.debug.core ]; then gdb libc3_test.debug libc3_test.debug.core; else gdb libc3_test.debug; fi
+
ic3_test_cov:
IC3=${C3_TOP}/ic3/ic3.cov time ./ic3_test