aboutsummaryrefslogtreecommitdiff
path: root/debug.c
diff options
context:
space:
mode:
authorJuan Cespedes <cespedes@debian.org>2009-05-14 13:47:58 +0200
committerJuan Cespedes <cespedes@debian.org>2009-05-14 13:47:58 +0200
commitcd8976dbee947f152c3a322503a1063c6359da76 (patch)
tree2ceab3f0794ec394fdefc75f9be479339673efe1 /debug.c
parent7c3b431ca18bebd4b78e8e254ad389bc26d6bd57 (diff)
downloadltrace-cd8976dbee947f152c3a322503a1063c6359da76.tar.gz
better debugging support (-d option)
Diffstat (limited to 'debug.c')
-rw-r--r--debug.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/debug.c b/debug.c
index c31a9a9..e6b9748 100644
--- a/debug.c
+++ b/debug.c
@@ -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,