About LibDebug
On signal catch, this library will display lots of useful debugging information depending to the environment variable DEBUG_.
Usage
This library need to be link to the application under debugging or to be preloaded before starting the application.
Variable
Environment variable DEBUG_ activates the signal catcher. If is contains 'y' all information are displayed but one can display only selective information such as:
- signal name is always displayed,
- if bit 0 is activated (ie 1), backtrace is displayed,
- if bit 1 is activated (ie 2), process status is displayed,
- if bit 2 is activated (ie 4), map list is displayed,
- if bit 3 is activated (ie 8), file descriptor list is displayed.
Examples
The following examples show what is needed during linking of at execution time to get selective information on a segfault.
echo 'int main (int argc, char *argv[]) { return *argv[argc]; }' > test.c gcc -ldebug test.c DEBUG_=y ./a.out gcc test.c LD_PRELOAD=/usr/lib/libdebug.so DEBUG_=9 ./a.out
Screen-shot
Shell view
Downloads
Source packages
Debian packages
- LibDebug version 1.2.2 (i386)
- LibDebug version 1.2.2 (amd64)
- LibDebug version 1.2.2 (dev i386)
- LibDebug version 1.2.2 (dev amd64)
Requirements
This library only need a C compiler to be build.
To install, one only needs to
- unpack the archive,
- do a 'make',
- and a 'make install'.
Changelogs
LibDebug 1.2.2 (Thu, 28 Mar 2024 07:45:15 +0100)
- Fixes from gcc 12 compilation warnings
LibDebug 1.2.1 (Tue, 03 Jun 2014 09:17:08 +0200)
- Split debian packaging
LibDebug 1.2 (Tue, 17 Sep 2013 12:15:50 +0200)
- First public release
LibDebug 1.0 (Sat Dec 29 11:48:56 2012 +0100)
LibDebug 0.1 (Wed Dec 26 11:25:16 2012 +0100)
- Initial version