diff options
author | Juan Cespedes <cespedes@debian.org> | 2009-05-14 13:47:58 +0200 |
---|---|---|
committer | Juan Cespedes <cespedes@debian.org> | 2009-05-14 13:47:58 +0200 |
commit | cd8976dbee947f152c3a322503a1063c6359da76 (patch) | |
tree | 2ceab3f0794ec394fdefc75f9be479339673efe1 /debug.c | |
parent | 7c3b431ca18bebd4b78e8e254ad389bc26d6bd57 (diff) | |
download | ltrace-cd8976dbee947f152c3a322503a1063c6359da76.tar.gz |
better debugging support (-d option)
Diffstat (limited to 'debug.c')
-rw-r--r-- | debug.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -6,19 +6,18 @@ #include "output.h" void -debug_(int level, const char *file, int line, const char *func, - const char *fmt, ...) { +debug_(int level, const char *file, int line, const char *fmt, ...) { char buf[1024]; va_list args; - if (options.debug < level) { + if (!(options.debug & level)) { return; } va_start(args, fmt); vsnprintf(buf, 1024, fmt, args); va_end(args); - output_line(NULL, "DEBUG: %s:%d: %s(): %s", file, line, func, buf); + output_line(NULL, "DEBUG: %s:%d: %s", file, line, buf); } // The following section provides a way to print things, like hex dumps, |