Index: src/libcfa/Makefile.am
===================================================================
--- src/libcfa/Makefile.am	(revision 36982fc1f527597d650797d8db4fa9d288e819d9)
+++ src/libcfa/Makefile.am	(revision 875a72fc63ec1c00f94434e8e20f18e17cd51d0c)
@@ -55,5 +55,5 @@
 
 libobjs = ${headers:=.o}
-libsrc = libcfa-prelude.c interpose.c libhdr/libdebug.c ${headers:=.c} \
+libsrc = libcfa-prelude.c interpose.c bits/debug.c ${headers:=.c} \
 	 assert.c exception.c virtual.c
 
@@ -102,9 +102,9 @@
 	bits/containers.h		\
 	bits/defs.h 		\
+	bits/debug.h 		\
 	bits/locks.h 		\
 	concurrency/invoke.h 	\
 	libhdr.h 			\
 	libhdr/libalign.h 	\
-	libhdr/libdebug.h 	\
 	libhdr/libtools.h
 
Index: src/libcfa/Makefile.in
===================================================================
--- src/libcfa/Makefile.in	(revision 36982fc1f527597d650797d8db4fa9d288e819d9)
+++ src/libcfa/Makefile.in	(revision 875a72fc63ec1c00f94434e8e20f18e17cd51d0c)
@@ -149,5 +149,5 @@
 libcfa_d_a_LIBADD =
 am__libcfa_d_a_SOURCES_DIST = libcfa-prelude.c interpose.c \
-	libhdr/libdebug.c fstream.c iostream.c iterator.c limits.c \
+	bits/debug.c fstream.c iostream.c iterator.c limits.c \
 	rational.c stdlib.c containers/maybe.c containers/pair.c \
 	containers/result.c containers/vector.c \
@@ -175,21 +175,20 @@
 @BUILD_CONCURRENCY_TRUE@	concurrency/libcfa_d_a-preemption.$(OBJEXT)
 am__objects_4 = libcfa_d_a-libcfa-prelude.$(OBJEXT) \
-	libcfa_d_a-interpose.$(OBJEXT) \
-	libhdr/libcfa_d_a-libdebug.$(OBJEXT) $(am__objects_2) \
-	libcfa_d_a-assert.$(OBJEXT) libcfa_d_a-exception.$(OBJEXT) \
-	libcfa_d_a-virtual.$(OBJEXT) $(am__objects_3)
+	libcfa_d_a-interpose.$(OBJEXT) bits/libcfa_d_a-debug.$(OBJEXT) \
+	$(am__objects_2) libcfa_d_a-assert.$(OBJEXT) \
+	libcfa_d_a-exception.$(OBJEXT) libcfa_d_a-virtual.$(OBJEXT) \
+	$(am__objects_3)
 am_libcfa_d_a_OBJECTS = $(am__objects_4)
 libcfa_d_a_OBJECTS = $(am_libcfa_d_a_OBJECTS)
 libcfa_a_AR = $(AR) $(ARFLAGS)
 libcfa_a_LIBADD =
-am__libcfa_a_SOURCES_DIST = libcfa-prelude.c interpose.c \
-	libhdr/libdebug.c fstream.c iostream.c iterator.c limits.c \
-	rational.c stdlib.c containers/maybe.c containers/pair.c \
-	containers/result.c containers/vector.c \
-	concurrency/coroutine.c concurrency/thread.c \
-	concurrency/kernel.c concurrency/monitor.c assert.c \
-	exception.c virtual.c concurrency/CtxSwitch-@MACHINE_TYPE@.S \
-	concurrency/alarm.c concurrency/invoke.c \
-	concurrency/preemption.c
+am__libcfa_a_SOURCES_DIST = libcfa-prelude.c interpose.c bits/debug.c \
+	fstream.c iostream.c iterator.c limits.c rational.c stdlib.c \
+	containers/maybe.c containers/pair.c containers/result.c \
+	containers/vector.c concurrency/coroutine.c \
+	concurrency/thread.c concurrency/kernel.c \
+	concurrency/monitor.c assert.c exception.c virtual.c \
+	concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/alarm.c \
+	concurrency/invoke.c concurrency/preemption.c
 @BUILD_CONCURRENCY_TRUE@am__objects_5 = concurrency/libcfa_a-coroutine.$(OBJEXT) \
 @BUILD_CONCURRENCY_TRUE@	concurrency/libcfa_a-thread.$(OBJEXT) \
@@ -208,8 +207,8 @@
 @BUILD_CONCURRENCY_TRUE@	concurrency/libcfa_a-preemption.$(OBJEXT)
 am__objects_8 = libcfa_a-libcfa-prelude.$(OBJEXT) \
-	libcfa_a-interpose.$(OBJEXT) \
-	libhdr/libcfa_a-libdebug.$(OBJEXT) $(am__objects_6) \
-	libcfa_a-assert.$(OBJEXT) libcfa_a-exception.$(OBJEXT) \
-	libcfa_a-virtual.$(OBJEXT) $(am__objects_7)
+	libcfa_a-interpose.$(OBJEXT) bits/libcfa_a-debug.$(OBJEXT) \
+	$(am__objects_6) libcfa_a-assert.$(OBJEXT) \
+	libcfa_a-exception.$(OBJEXT) libcfa_a-virtual.$(OBJEXT) \
+	$(am__objects_7)
 am_libcfa_a_OBJECTS = $(am__objects_8)
 libcfa_a_OBJECTS = $(am_libcfa_a_OBJECTS)
@@ -265,6 +264,6 @@
 	concurrency/thread concurrency/kernel concurrency/monitor \
 	${shell echo stdhdr/*} math gmp bits/containers.h bits/defs.h \
-	bits/locks.h concurrency/invoke.h libhdr.h libhdr/libalign.h \
-	libhdr/libdebug.h libhdr/libtools.h
+	bits/debug.h bits/locks.h concurrency/invoke.h libhdr.h \
+	libhdr/libalign.h libhdr/libtools.h
 HEADERS = $(nobase_cfa_include_HEADERS)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
@@ -424,5 +423,5 @@
 	containers/vector $(am__append_3)
 libobjs = ${headers:=.o}
-libsrc = libcfa-prelude.c interpose.c libhdr/libdebug.c ${headers:=.c} \
+libsrc = libcfa-prelude.c interpose.c bits/debug.c ${headers:=.c} \
 	assert.c exception.c virtual.c $(am__append_4)
 libcfa_a_SOURCES = ${libsrc}
@@ -439,9 +438,9 @@
 	bits/containers.h		\
 	bits/defs.h 		\
+	bits/debug.h 		\
 	bits/locks.h 		\
 	concurrency/invoke.h 	\
 	libhdr.h 			\
 	libhdr/libalign.h 	\
-	libhdr/libdebug.h 	\
 	libhdr/libtools.h
 
@@ -511,12 +510,12 @@
 clean-libLIBRARIES:
 	-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
-libhdr/$(am__dirstamp):
-	@$(MKDIR_P) libhdr
-	@: > libhdr/$(am__dirstamp)
-libhdr/$(DEPDIR)/$(am__dirstamp):
-	@$(MKDIR_P) libhdr/$(DEPDIR)
-	@: > libhdr/$(DEPDIR)/$(am__dirstamp)
-libhdr/libcfa_d_a-libdebug.$(OBJEXT): libhdr/$(am__dirstamp) \
-	libhdr/$(DEPDIR)/$(am__dirstamp)
+bits/$(am__dirstamp):
+	@$(MKDIR_P) bits
+	@: > bits/$(am__dirstamp)
+bits/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) bits/$(DEPDIR)
+	@: > bits/$(DEPDIR)/$(am__dirstamp)
+bits/libcfa_d_a-debug.$(OBJEXT): bits/$(am__dirstamp) \
+	bits/$(DEPDIR)/$(am__dirstamp)
 containers/$(am__dirstamp):
 	@$(MKDIR_P) containers
@@ -563,6 +562,6 @@
 	$(AM_V_AR)$(libcfa_d_a_AR) libcfa-d.a $(libcfa_d_a_OBJECTS) $(libcfa_d_a_LIBADD)
 	$(AM_V_at)$(RANLIB) libcfa-d.a
-libhdr/libcfa_a-libdebug.$(OBJEXT): libhdr/$(am__dirstamp) \
-	libhdr/$(DEPDIR)/$(am__dirstamp)
+bits/libcfa_a-debug.$(OBJEXT): bits/$(am__dirstamp) \
+	bits/$(DEPDIR)/$(am__dirstamp)
 containers/libcfa_a-maybe.$(OBJEXT): containers/$(am__dirstamp) \
 	containers/$(DEPDIR)/$(am__dirstamp)
@@ -596,7 +595,7 @@
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
+	-rm -f bits/*.$(OBJEXT)
 	-rm -f concurrency/*.$(OBJEXT)
 	-rm -f containers/*.$(OBJEXT)
-	-rm -f libhdr/*.$(OBJEXT)
 
 distclean-compile:
@@ -625,4 +624,6 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-stdlib.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-virtual.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@bits/$(DEPDIR)/libcfa_a-debug.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@bits/$(DEPDIR)/libcfa_d_a-debug.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/CtxSwitch-@MACHINE_TYPE@.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_a-alarm.Po@am__quote@
@@ -648,6 +649,4 @@
 @AMDEP_TRUE@@am__include@ @am__quote@containers/$(DEPDIR)/libcfa_d_a-result.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@containers/$(DEPDIR)/libcfa_d_a-vector.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libhdr/$(DEPDIR)/libcfa_a-libdebug.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libhdr/$(DEPDIR)/libcfa_d_a-libdebug.Po@am__quote@
 
 .S.o:
@@ -704,17 +703,17 @@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-interpose.obj `if test -f 'interpose.c'; then $(CYGPATH_W) 'interpose.c'; else $(CYGPATH_W) '$(srcdir)/interpose.c'; fi`
 
-libhdr/libcfa_d_a-libdebug.o: libhdr/libdebug.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libhdr/libcfa_d_a-libdebug.o -MD -MP -MF libhdr/$(DEPDIR)/libcfa_d_a-libdebug.Tpo -c -o libhdr/libcfa_d_a-libdebug.o `test -f 'libhdr/libdebug.c' || echo '$(srcdir)/'`libhdr/libdebug.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhdr/$(DEPDIR)/libcfa_d_a-libdebug.Tpo libhdr/$(DEPDIR)/libcfa_d_a-libdebug.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='libhdr/libdebug.c' object='libhdr/libcfa_d_a-libdebug.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libhdr/libcfa_d_a-libdebug.o `test -f 'libhdr/libdebug.c' || echo '$(srcdir)/'`libhdr/libdebug.c
-
-libhdr/libcfa_d_a-libdebug.obj: libhdr/libdebug.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libhdr/libcfa_d_a-libdebug.obj -MD -MP -MF libhdr/$(DEPDIR)/libcfa_d_a-libdebug.Tpo -c -o libhdr/libcfa_d_a-libdebug.obj `if test -f 'libhdr/libdebug.c'; then $(CYGPATH_W) 'libhdr/libdebug.c'; else $(CYGPATH_W) '$(srcdir)/libhdr/libdebug.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhdr/$(DEPDIR)/libcfa_d_a-libdebug.Tpo libhdr/$(DEPDIR)/libcfa_d_a-libdebug.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='libhdr/libdebug.c' object='libhdr/libcfa_d_a-libdebug.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libhdr/libcfa_d_a-libdebug.obj `if test -f 'libhdr/libdebug.c'; then $(CYGPATH_W) 'libhdr/libdebug.c'; else $(CYGPATH_W) '$(srcdir)/libhdr/libdebug.c'; fi`
+bits/libcfa_d_a-debug.o: bits/debug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT bits/libcfa_d_a-debug.o -MD -MP -MF bits/$(DEPDIR)/libcfa_d_a-debug.Tpo -c -o bits/libcfa_d_a-debug.o `test -f 'bits/debug.c' || echo '$(srcdir)/'`bits/debug.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) bits/$(DEPDIR)/libcfa_d_a-debug.Tpo bits/$(DEPDIR)/libcfa_d_a-debug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='bits/debug.c' object='bits/libcfa_d_a-debug.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o bits/libcfa_d_a-debug.o `test -f 'bits/debug.c' || echo '$(srcdir)/'`bits/debug.c
+
+bits/libcfa_d_a-debug.obj: bits/debug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT bits/libcfa_d_a-debug.obj -MD -MP -MF bits/$(DEPDIR)/libcfa_d_a-debug.Tpo -c -o bits/libcfa_d_a-debug.obj `if test -f 'bits/debug.c'; then $(CYGPATH_W) 'bits/debug.c'; else $(CYGPATH_W) '$(srcdir)/bits/debug.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) bits/$(DEPDIR)/libcfa_d_a-debug.Tpo bits/$(DEPDIR)/libcfa_d_a-debug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='bits/debug.c' object='bits/libcfa_d_a-debug.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o bits/libcfa_d_a-debug.obj `if test -f 'bits/debug.c'; then $(CYGPATH_W) 'bits/debug.c'; else $(CYGPATH_W) '$(srcdir)/bits/debug.c'; fi`
 
 libcfa_d_a-fstream.o: fstream.c
@@ -998,17 +997,17 @@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-interpose.obj `if test -f 'interpose.c'; then $(CYGPATH_W) 'interpose.c'; else $(CYGPATH_W) '$(srcdir)/interpose.c'; fi`
 
-libhdr/libcfa_a-libdebug.o: libhdr/libdebug.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libhdr/libcfa_a-libdebug.o -MD -MP -MF libhdr/$(DEPDIR)/libcfa_a-libdebug.Tpo -c -o libhdr/libcfa_a-libdebug.o `test -f 'libhdr/libdebug.c' || echo '$(srcdir)/'`libhdr/libdebug.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhdr/$(DEPDIR)/libcfa_a-libdebug.Tpo libhdr/$(DEPDIR)/libcfa_a-libdebug.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='libhdr/libdebug.c' object='libhdr/libcfa_a-libdebug.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libhdr/libcfa_a-libdebug.o `test -f 'libhdr/libdebug.c' || echo '$(srcdir)/'`libhdr/libdebug.c
-
-libhdr/libcfa_a-libdebug.obj: libhdr/libdebug.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libhdr/libcfa_a-libdebug.obj -MD -MP -MF libhdr/$(DEPDIR)/libcfa_a-libdebug.Tpo -c -o libhdr/libcfa_a-libdebug.obj `if test -f 'libhdr/libdebug.c'; then $(CYGPATH_W) 'libhdr/libdebug.c'; else $(CYGPATH_W) '$(srcdir)/libhdr/libdebug.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhdr/$(DEPDIR)/libcfa_a-libdebug.Tpo libhdr/$(DEPDIR)/libcfa_a-libdebug.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='libhdr/libdebug.c' object='libhdr/libcfa_a-libdebug.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libhdr/libcfa_a-libdebug.obj `if test -f 'libhdr/libdebug.c'; then $(CYGPATH_W) 'libhdr/libdebug.c'; else $(CYGPATH_W) '$(srcdir)/libhdr/libdebug.c'; fi`
+bits/libcfa_a-debug.o: bits/debug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT bits/libcfa_a-debug.o -MD -MP -MF bits/$(DEPDIR)/libcfa_a-debug.Tpo -c -o bits/libcfa_a-debug.o `test -f 'bits/debug.c' || echo '$(srcdir)/'`bits/debug.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) bits/$(DEPDIR)/libcfa_a-debug.Tpo bits/$(DEPDIR)/libcfa_a-debug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='bits/debug.c' object='bits/libcfa_a-debug.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o bits/libcfa_a-debug.o `test -f 'bits/debug.c' || echo '$(srcdir)/'`bits/debug.c
+
+bits/libcfa_a-debug.obj: bits/debug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT bits/libcfa_a-debug.obj -MD -MP -MF bits/$(DEPDIR)/libcfa_a-debug.Tpo -c -o bits/libcfa_a-debug.obj `if test -f 'bits/debug.c'; then $(CYGPATH_W) 'bits/debug.c'; else $(CYGPATH_W) '$(srcdir)/bits/debug.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) bits/$(DEPDIR)/libcfa_a-debug.Tpo bits/$(DEPDIR)/libcfa_a-debug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='bits/debug.c' object='bits/libcfa_a-debug.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o bits/libcfa_a-debug.obj `if test -f 'bits/debug.c'; then $(CYGPATH_W) 'bits/debug.c'; else $(CYGPATH_W) '$(srcdir)/bits/debug.c'; fi`
 
 libcfa_a-fstream.o: fstream.c
@@ -1411,10 +1410,10 @@
 	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
 	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f bits/$(DEPDIR)/$(am__dirstamp)
+	-rm -f bits/$(am__dirstamp)
 	-rm -f concurrency/$(DEPDIR)/$(am__dirstamp)
 	-rm -f concurrency/$(am__dirstamp)
 	-rm -f containers/$(DEPDIR)/$(am__dirstamp)
 	-rm -f containers/$(am__dirstamp)
-	-rm -f libhdr/$(DEPDIR)/$(am__dirstamp)
-	-rm -f libhdr/$(am__dirstamp)
 
 maintainer-clean-generic:
@@ -1426,5 +1425,5 @@
 
 distclean: distclean-am
-	-rm -rf ./$(DEPDIR) concurrency/$(DEPDIR) containers/$(DEPDIR) libhdr/$(DEPDIR)
+	-rm -rf ./$(DEPDIR) bits/$(DEPDIR) concurrency/$(DEPDIR) containers/$(DEPDIR)
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
@@ -1472,5 +1471,5 @@
 
 maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR) concurrency/$(DEPDIR) containers/$(DEPDIR) libhdr/$(DEPDIR)
+	-rm -rf ./$(DEPDIR) bits/$(DEPDIR) concurrency/$(DEPDIR) containers/$(DEPDIR)
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic \
Index: src/libcfa/assert.c
===================================================================
--- src/libcfa/assert.c	(revision 36982fc1f527597d650797d8db4fa9d288e819d9)
+++ src/libcfa/assert.c	(revision 875a72fc63ec1c00f94434e8e20f18e17cd51d0c)
@@ -17,5 +17,5 @@
 #include <stdarg.h>								// varargs
 #include <stdio.h>								// fprintf
-#include "libhdr/libdebug.h"
+#include "bits/debug.h"
 
 extern "C" {
Index: src/libcfa/bits/debug.c
===================================================================
--- src/libcfa/bits/debug.c	(revision 875a72fc63ec1c00f94434e8e20f18e17cd51d0c)
+++ src/libcfa/bits/debug.c	(revision 875a72fc63ec1c00f94434e8e20f18e17cd51d0c)
@@ -0,0 +1,88 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// libdebug.c --
+//
+// Author           : Thierry Delisle
+// Created On       : Thu Mar 30 12:30:01 2017
+// Last Modified By :
+// Last Modified On :
+// Update Count     : 0
+//
+
+extern "C" {
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <stdarg.h>
+#include <unistd.h>
+}
+
+enum { buffer_size = 512 };
+static char buffer[ buffer_size ];
+
+extern "C" {
+
+	void __cfaabi_dbg_bits_write( const char *in_buffer, int len ) {
+		// ensure all data is written
+		for ( int count = 0, retcode; count < len; count += retcode ) {
+			in_buffer += count;
+
+			for ( ;; ) {
+				retcode = write( STDERR_FILENO, in_buffer, len - count );
+
+				// not a timer interrupt ?
+				if ( retcode != -1 || errno != EINTR ) break;
+			}
+
+			if ( retcode == -1 ) _exit( EXIT_FAILURE );
+		}
+	}
+
+	void __cfaabi_dbg_bits_acquire() __attribute__((__weak__)) {}
+	void __cfaabi_dbg_bits_release() __attribute__((__weak__)) {}
+
+	void __cfaabi_dbg_bits_print_safe  ( const char fmt[], ... ) __attribute__(( format (printf, 1, 2) )) {
+		va_list args;
+
+		va_start( args, fmt );
+		__cfaabi_dbg_bits_acquire();
+
+		int len = vsnprintf( buffer, buffer_size, fmt, args );
+		__cfaabi_dbg_bits_write( buffer, len );
+
+		__cfaabi_dbg_bits_release();
+		va_end( args );
+	}
+
+	void __cfaabi_dbg_bits_print_nolock( const char fmt[], ... ) __attribute__(( format (printf, 1, 2) )) {
+		va_list args;
+
+		va_start( args, fmt );
+
+		int len = vsnprintf( buffer, buffer_size, fmt, args );
+		__cfaabi_dbg_bits_write( buffer, len );
+
+		va_end( args );
+	}
+
+	void __cfaabi_dbg_bits_print_vararg( const char fmt[], va_list args ) {
+		int len = vsnprintf( buffer, buffer_size, fmt, args );
+		__cfaabi_dbg_bits_write( buffer, len );
+	}
+
+	void __cfaabi_dbg_bits_print_buffer( char in_buffer[], int in_buffer_size, const char fmt[], ... ) __attribute__(( format (printf, 3, 4) )) {
+		va_list args;
+
+		va_start( args, fmt );
+
+		int len = vsnprintf( in_buffer, in_buffer_size, fmt, args );
+		__cfaabi_dbg_bits_write( in_buffer, len );
+
+		va_end( args );
+	}
+}
Index: src/libcfa/bits/debug.h
===================================================================
--- src/libcfa/bits/debug.h	(revision 875a72fc63ec1c00f94434e8e20f18e17cd51d0c)
+++ src/libcfa/bits/debug.h	(revision 875a72fc63ec1c00f94434e8e20f18e17cd51d0c)
@@ -0,0 +1,74 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// libdebug.h --
+//
+// Author           : Thierry Delisle
+// Created On       : Mon Nov 28 12:27:26 2016
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Sat Jul 22 10:02:24 2017
+// Update Count     : 1
+//
+
+#pragma once
+
+#ifdef __CFA_DEBUG__
+	#define __cfaabi_dbg_debug_do(...) __VA_ARGS__
+	#define __cfaabi_dbg_no_debug_do(...)
+	#define __cfaabi_dbg_ctx __PRETTY_FUNCTION__
+	#define __cfaabi_dbg_ctx2 , __PRETTY_FUNCTION__
+	#define __cfaabi_dbg_ctx_param const char * caller
+	#define __cfaabi_dbg_ctx_param2 , const char * caller
+#else
+	#define __cfaabi_dbg_debug_do(...)
+	#define __cfaabi_dbg_no_debug_do(...) __VA_ARGS__
+	#define __cfaabi_dbg_ctx
+	#define __cfaabi_dbg_ctx2
+	#define __cfaabi_dbg_ctx_param
+	#define __cfaabi_dbg_ctx_param2
+#endif
+
+#ifdef __cforall
+extern "C" {
+#endif
+	#include <stdarg.h>
+	#include <stdio.h>
+
+      extern void __cfaabi_dbg_bits_write( const char *buffer, int len );
+      extern void __cfaabi_dbg_bits_acquire();
+      extern void __cfaabi_dbg_bits_release();
+      extern void __cfaabi_dbg_bits_print_safe  ( const char fmt[], ... ) __attribute__(( format (printf, 1, 2) ));
+      extern void __cfaabi_dbg_bits_print_nolock( const char fmt[], ... ) __attribute__(( format (printf, 1, 2) ));
+      extern void __cfaabi_dbg_bits_print_vararg( const char fmt[], va_list arg );
+      extern void __cfaabi_dbg_bits_print_buffer( char buffer[], int buffer_size, const char fmt[], ... ) __attribute__(( format (printf, 3, 4) ));
+#ifdef __cforall
+}
+#endif
+
+#ifdef __CFA_DEBUG_PRINT__
+	#define __cfaabi_dbg_write( buffer, len )         __cfaabi_dbg_bits_write( buffer, len )
+	#define __cfaabi_dbg_acquire()                    __cfaabi_dbg_bits_acquire()
+	#define __cfaabi_dbg_release()                    __cfaabi_dbg_bits_release()
+	#define __cfaabi_dbg_print_safe(...)              __cfaabi_dbg_bits_print_safe   (__VA_ARGS__)
+	#define __cfaabi_dbg_print_nolock(...)            __cfaabi_dbg_bits_print_nolock (__VA_ARGS__)
+	#define __cfaabi_dbg_print_buffer(...)            __cfaabi_dbg_bits_print_buffer (__VA_ARGS__)
+	#define __cfaabi_dbg_print_buffer_decl(...)       char __dbg_text[256]; int __dbg_len = snprintf( __dbg_text, 256, __VA_ARGS__ ); __cfaabi_dbg_bits_write( __dbg_text, __dbg_len );
+	#define __cfaabi_dbg_print_buffer_local(...)      __dbg_len = snprintf( __dbg_text, 256, __VA_ARGS__ ); __cfaabi_dbg_bits_write( __dbg_text, __dbg_len );
+#else
+	#define __cfaabi_dbg_write(...)               ((void)0)
+	#define __cfaabi_dbg_acquire()                ((void)0)
+	#define __cfaabi_dbg_release()                ((void)0)
+	#define __cfaabi_dbg_print_safe(...)          ((void)0)
+	#define __cfaabi_dbg_print_nolock(...)        ((void)0)
+	#define __cfaabi_dbg_print_buffer(...)        ((void)0)
+	#define __cfaabi_dbg_print_buffer_decl(...)   ((void)0)
+	#define __cfaabi_dbg_print_buffer_local(...)  ((void)0)
+#endif
+
+// Local Variables: //
+// mode: c //
+// tab-width: 4 //
+// End: //
Index: src/libcfa/bits/locks.h
===================================================================
--- src/libcfa/bits/locks.h	(revision 36982fc1f527597d650797d8db4fa9d288e819d9)
+++ src/libcfa/bits/locks.h	(revision 875a72fc63ec1c00f94434e8e20f18e17cd51d0c)
@@ -16,4 +16,5 @@
 #pragma once
 
+#include "bits/debug.h"
 #include "bits/defs.h"
 
Index: src/libcfa/exception.c
===================================================================
--- src/libcfa/exception.c	(revision 36982fc1f527597d650797d8db4fa9d288e819d9)
+++ src/libcfa/exception.c	(revision 875a72fc63ec1c00f94434e8e20f18e17cd51d0c)
@@ -23,5 +23,5 @@
 #include <stdio.h>
 #include <unwind.h>
-#include <libhdr/libdebug.h>
+#include <bits/debug.h>
 
 // FIX ME: temporary hack to keep ARM build working
Index: src/libcfa/interpose.c
===================================================================
--- src/libcfa/interpose.c	(revision 36982fc1f527597d650797d8db4fa9d288e819d9)
+++ src/libcfa/interpose.c	(revision 875a72fc63ec1c00f94434e8e20f18e17cd51d0c)
@@ -24,5 +24,5 @@
 }
 
-#include "libhdr/libdebug.h"
+#include "bits/debug.h"
 #include "libhdr/libtools.h"
 #include "startup.h"
@@ -69,6 +69,4 @@
 __typeof__( exit ) libc_exit __attribute__(( noreturn ));
 __typeof__( abort ) libc_abort __attribute__(( noreturn ));
-
-// #define INIT_REALRTN( x, ver ) libc_##x = (__typeof__(libc_##x))interpose_symbol( #x, ver )
 
 forall(dtype T)
Index: src/libcfa/libhdr.h
===================================================================
--- src/libcfa/libhdr.h	(revision 36982fc1f527597d650797d8db4fa9d288e819d9)
+++ src/libcfa/libhdr.h	(revision 875a72fc63ec1c00f94434e8e20f18e17cd51d0c)
@@ -17,5 +17,4 @@
 
 #include "libhdr/libalign.h"
-#include "libhdr/libdebug.h"
 #include "libhdr/libtools.h"
 
Index: c/libcfa/libhdr/libdebug.c
===================================================================
--- src/libcfa/libhdr/libdebug.c	(revision 36982fc1f527597d650797d8db4fa9d288e819d9)
+++ 	(revision )
@@ -1,88 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// libdebug.c --
-//
-// Author           : Thierry Delisle
-// Created On       : Thu Mar 30 12:30:01 2017
-// Last Modified By :
-// Last Modified On :
-// Update Count     : 0
-//
-
-extern "C" {
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <stdarg.h>
-#include <unistd.h>
-}
-
-enum { buffer_size = 512 };
-static char buffer[ buffer_size ];
-
-extern "C" {
-
-	void __cfaabi_dbg_bits_write( const char *in_buffer, int len ) {
-		// ensure all data is written
-		for ( int count = 0, retcode; count < len; count += retcode ) {
-			in_buffer += count;
-
-			for ( ;; ) {
-				retcode = write( STDERR_FILENO, in_buffer, len - count );
-
-				// not a timer interrupt ?
-				if ( retcode != -1 || errno != EINTR ) break;
-			}
-
-			if ( retcode == -1 ) _exit( EXIT_FAILURE );
-		}
-	}
-
-	void __cfaabi_dbg_bits_acquire() __attribute__((__weak__)) {}
-	void __cfaabi_dbg_bits_release() __attribute__((__weak__)) {}
-
-	void __cfaabi_dbg_bits_print_safe  ( const char fmt[], ... ) __attribute__(( format (printf, 1, 2) )) {
-		va_list args;
-
-		va_start( args, fmt );
-		__cfaabi_dbg_bits_acquire();
-
-		int len = vsnprintf( buffer, buffer_size, fmt, args );
-		__cfaabi_dbg_bits_write( buffer, len );
-
-		__cfaabi_dbg_bits_release();
-		va_end( args );
-	}
-
-	void __cfaabi_dbg_bits_print_nolock( const char fmt[], ... ) __attribute__(( format (printf, 1, 2) )) {
-		va_list args;
-
-		va_start( args, fmt );
-
-		int len = vsnprintf( buffer, buffer_size, fmt, args );
-		__cfaabi_dbg_bits_write( buffer, len );
-
-		va_end( args );
-	}
-
-	void __cfaabi_dbg_bits_print_vararg( const char fmt[], va_list args ) {
-		int len = vsnprintf( buffer, buffer_size, fmt, args );
-		__cfaabi_dbg_bits_write( buffer, len );
-	}
-
-	void __cfaabi_dbg_bits_print_buffer( char in_buffer[], int in_buffer_size, const char fmt[], ... ) __attribute__(( format (printf, 3, 4) )) {
-		va_list args;
-
-		va_start( args, fmt );
-
-		int len = vsnprintf( in_buffer, in_buffer_size, fmt, args );
-		__cfaabi_dbg_bits_write( in_buffer, len );
-
-		va_end( args );
-	}
-}
Index: c/libcfa/libhdr/libdebug.h
===================================================================
--- src/libcfa/libhdr/libdebug.h	(revision 36982fc1f527597d650797d8db4fa9d288e819d9)
+++ 	(revision )
@@ -1,79 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// libdebug.h --
-//
-// Author           : Thierry Delisle
-// Created On       : Mon Nov 28 12:27:26 2016
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Jul 22 10:02:24 2017
-// Update Count     : 1
-//
-
-#pragma once
-
-#ifdef __CFA_DEBUG__
-	#define __cfaabi_dbg_debug_do(...) __VA_ARGS__
-	#define __cfaabi_dbg_no_debug_do(...)
-	#define __cfaabi_dbg_ctx __PRETTY_FUNCTION__
-	#define __cfaabi_dbg_ctx2 , __PRETTY_FUNCTION__
-	#define __cfaabi_dbg_ctx_param const char * caller
-	#define __cfaabi_dbg_ctx_param2 , const char * caller
-#else
-	#define __cfaabi_dbg_debug_do(...)
-	#define __cfaabi_dbg_no_debug_do(...) __VA_ARGS__
-	#define __cfaabi_dbg_ctx
-	#define __cfaabi_dbg_ctx2
-	#define __cfaabi_dbg_ctx_param
-	#define __cfaabi_dbg_ctx_param2
-#endif
-
-__cfaabi::ehm
-__cfaabi::dbg
-__cfaabi::rt
-__cfaabi::mem
-
-#ifdef __cforall
-extern "C" {
-#endif
-	#include <stdarg.h>
-	#include <stdio.h>
-
-      extern void __cfaabi_dbg_bits_write( const char *buffer, int len );
-      extern void __cfaabi_dbg_bits_acquire();
-      extern void __cfaabi_dbg_bits_release();
-      extern void __cfaabi_dbg_bits_print_safe  ( const char fmt[], ... ) __attribute__(( format (printf, 1, 2) ));
-      extern void __cfaabi_dbg_bits_print_nolock( const char fmt[], ... ) __attribute__(( format (printf, 1, 2) ));
-      extern void __cfaabi_dbg_bits_print_vararg( const char fmt[], va_list arg );
-      extern void __cfaabi_dbg_bits_print_buffer( char buffer[], int buffer_size, const char fmt[], ... ) __attribute__(( format (printf, 3, 4) ));
-#ifdef __cforall
-}
-#endif
-
-#ifdef __CFA_DEBUG_PRINT__
-	#define __cfaabi_dbg_write( buffer, len )         __cfaabi_dbg_bits_write( buffer, len )
-	#define __cfaabi_dbg_acquire()                    __cfaabi_dbg_bits_acquire()
-	#define __cfaabi_dbg_release()                    __cfaabi_dbg_bits_release()
-	#define __cfaabi_dbg_print_safe(...)              __cfaabi_dbg_bits_print_safe   (__VA_ARGS__)
-	#define __cfaabi_dbg_print_nolock(...)            __cfaabi_dbg_bits_print_nolock (__VA_ARGS__)
-	#define __cfaabi_dbg_print_buffer(...)            __cfaabi_dbg_bits_print_buffer (__VA_ARGS__)
-	#define __cfaabi_dbg_print_buffer_decl(...)       char __dbg_text[256]; int __dbg_len = snprintf( __dbg_text, 256, __VA_ARGS__ ); __cfaabi_dbg_bits_write( __dbg_text, __dbg_len );
-	#define __cfaabi_dbg_print_buffer_local(...)      __dbg_len = snprintf( __dbg_text, 256, __VA_ARGS__ ); __cfaabi_dbg_bits_write( __dbg_text, __dbg_len );
-#else
-	#define __cfaabi_dbg_write(...)               ((void)0)
-	#define __cfaabi_dbg_acquire()                ((void)0)
-	#define __cfaabi_dbg_release()                ((void)0)
-	#define __cfaabi_dbg_print_safe(...)          ((void)0)
-	#define __cfaabi_dbg_print_nolock(...)        ((void)0)
-	#define __cfaabi_dbg_print_buffer(...)        ((void)0)
-	#define __cfaabi_dbg_print_buffer_decl(...)   ((void)0)
-	#define __cfaabi_dbg_print_buffer_local(...)  ((void)0)
-#endif
-
-// Local Variables: //
-// mode: c //
-// tab-width: 4 //
-// End: //
