The debug library

This library contains routines needed by many of my recent programs. It includes utilities to aid in debugging of programs.

Some of the features currently supported by this library are memory leak detection, hex dumping, and logging. The logging system is especially useful. It adds syntax highlighting for different log levels in debugging mode. There is different modes for printing to console and files, duplicate line detection and lots of other small things which makes life simpler for the programmer.

Package history

Release date Version Comments
2004-08-22 0.4.2 Fixed man page sections.
2004-07-31 0.4.1 Small bug fixes, new debian policy version, added syslog support.
2003-10-26 0.3.2 Added malloc attributes, new makefile system, optimized hex dumping, and added man pages.
2003-10-07 0.3.1 Added default fail stub, removed open/close macros, various bug fixes, added log_flush() function.
2003-06-16 0.2.3 Fixed #194981 and changed package section
2002-08-10 0.2.2 Fixed #156239
2002-07-06 0.2.1 Ported to FreeBSD, added duplicate line detection, and improved hex dumping function
2002-04-06 0.1.1 Initial Release

This package history is probably out of date (I only update it every now and then). For an up-to-date list of changes, please refer to the package changelog.

How libdebug came to be

The memory debugging system is based on the MAD (Memory Allocation Debugging) system found in Midnight Commander. I've rewritten it and improved it a little bit, but the idea behind it is still the same.

The logging system evolved from the need to print at different levels of verbosity and to see what the hell is going on when you've got a million debugging messages in the code. Since inception, the log system have changed quite a bit and I've added more and more syslog-like functionality. I'm currently planning to split this from the the library and make it a daemon instead.

The hex dumping code is pretty straightforward but quite useful.

download