aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Makefile
diff options
authorLinus Torvalds <torvalds@g5.osdl.org>2005-08-02 20:34:24 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-02 20:34:24 -0700
commit972609f0d10e3bcb10a9132802b2edb8b01d305f (patch)
tree3751b70f1ead214ee556c4fd498395aab693f56c /Makefile
parentac8ce3636d83e25d8a316fdce221e36c04c02dc1 (diff)
downloadsparse-dev-972609f0d10e3bcb10a9132802b2edb8b01d305f.tar.gz
Add DEBUG mode, which enables various expensive debug options
Right now it only makes 'blob_free()' mprotect(PROT_NONE) the buffer it free's instead of unmapping it, but that's already quite useful for figuring out when we've freed up memory that we later end up using after all. In particular, the multi-file mode ends up having different lifetime rules for the various objects, so it introduced some nasty MM bugs. With -DDEBUG we get some nice SIGSEGV's rather than just strange memory corruption.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index ed6fdb37..714348aa 100644
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,11 @@ LDFLAGS=-g
AR=ar
#
+# For debugging, uncomment the next one
+#
+CFLAGS += -DDEBUG
+
+#
# If building with shared libraries, you might
# want to add this
#