dwarf diagnostic output now controlled by -D
authorDima Kogan <dima@secretsauce.net>
Wed, 30 Apr 2014 11:17:35 +0000 (04:17 -0700)
committerChanho Park <chanho61.park@samsung.com>
Fri, 22 Aug 2014 11:38:26 +0000 (20:38 +0900)
dwarf_prototypes.c

index ef71f9e..90c1d65 100644 (file)
 #include "library.h"
 #include "options.h"
 #include "filter.h"
-
+#include "debug.h"
 
 //#define DUMP_PROTOTYPES
 
-#if 1
 #define complain(die, format, ...)                                                             \
-       fprintf(stderr, "%s() die '%s' @ 0x%lx: " format "\n",          \
-                       __func__, dwarf_diename(die), dwarf_dieoffset(die),     \
-                       ##__VA_ARGS__)
-#else
-#define complain(die, format, ...)
-#endif
+       debug(DEBUG_FUNCTION, "%s() die '%s' @ 0x%lx: " format,         \
+                 __func__, dwarf_diename(die), dwarf_dieoffset(die),   \
+                 ##__VA_ARGS__)
 
 #define NEXT_SIBLING(die)                                                              \
        int res = dwarf_siblingof(die, die);                            \