X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flib%2Fdebug.h;h=3218ab61360d8753c113674005dd8890d584aa95;hb=cf6f97138af7627600523c6d2de571c379667771;hp=2af8ba421ebe248b07c3a03d5e80fe09dbba3acc;hpb=ff144294a54d14af3c9324e6a336a3102094dea4;p=pintos-anon diff --git a/src/lib/debug.h b/src/lib/debug.h index 2af8ba4..3218ab6 100644 --- a/src/lib/debug.h +++ b/src/lib/debug.h @@ -1,5 +1,5 @@ -#ifndef HEADER_DEBUG_H -#define HEADER_DEBUG_H 1 +#ifndef __LIB_DEBUG_H +#define __LIB_DEBUG_H /* GCC lets us add "attributes" to functions, function parameters, etc. to indicate their properties. @@ -9,20 +9,10 @@ #define NO_INLINE __attribute__ ((noinline)) #define PRINTF_FORMAT(FMT, FIRST) __attribute__ ((format (printf, FMT, FIRST))) -/* Prints a debug message along with the source file name, line - number, and function name of where it was emitted. CLASS is - used to filter out unwanted messages. */ -#define DEBUG(CLASS, ...) \ - debug_message (__FILE__, __LINE__, __func__, #CLASS, __VA_ARGS__) - /* Halts the OS, printing the source file name, line number, and function name, plus a user-specific message. */ #define PANIC(...) debug_panic (__FILE__, __LINE__, __func__, __VA_ARGS__) -void debug_enable (char *classes); -void debug_message (const char *file, int line, const char *function, - const char *class, const char *message, ...) - PRINTF_FORMAT (5, 6); void debug_panic (const char *file, int line, const char *function, const char *message, ...) PRINTF_FORMAT (4, 5) NO_RETURN; void debug_backtrace (void); @@ -45,4 +35,4 @@ void debug_backtrace (void); #else #define ASSERT(CONDITION) ((void) 0) #define NOT_REACHED() for (;;) -#endif +#endif /* lib/debug.h */