va_end (ap);
}
-#define ax_debug_1(level, fmt, args...) \
+#define ax_debug(fmt, args...) \
do { \
- if (level <= debug_threads) \
+ if (debug_threads) \
ax_vdebug ((fmt), ##args); \
} while (0)
-#define ax_debug(FMT, args...) \
- ax_debug_1 (1, FMT, ##args)
-
/* This enum must exactly match what is documented in
gdb/doc/agentexpr.texi, including all the numerical values. */
static FILE *debug_file = stderr;
/* See debug.h. */
-int debug_threads;
+bool debug_threads;
/* Include timestamps in debugging output. */
int debug_timestamp;
/* Enable miscellaneous debugging output. The name is historical - it
was originally used to debug LinuxThreads support. */
-extern int debug_threads;
+extern bool debug_threads;
extern int debug_timestamp;
{
if (strcmp (mon, "set debug 1") == 0)
{
- debug_threads = 1;
+ debug_threads = true;
monitor_output ("Debug output enabled.\n");
}
else if (strcmp (mon, "set debug 0") == 0)
{
- debug_threads = 0;
+ debug_threads = false;
monitor_output ("Debug output disabled.\n");
}
else if (strcmp (mon, "set debug-hw-points 1") == 0)
*next_arg = NULL;
}
else if (strcmp (*next_arg, "--debug") == 0)
- debug_threads = 1;
+ debug_threads = true;
else if (startswith (*next_arg, "--debug-format="))
{
std::string error_msg
va_end (ap);
}
-#define trace_debug_1(level, fmt, args...) \
+#define trace_debug(fmt, args...) \
do { \
- if (level <= debug_threads) \
+ if (debug_threads) \
trace_vdebug ((fmt), ##args); \
} while (0)
#else
-#define trace_debug_1(level, fmt, args...) \
+#define trace_debug(fmt, args...) \
do { \
- if (level <= debug_threads) \
+ if (debug_threads) \
{ \
debug_printf ((fmt), ##args); \
debug_printf ("\n"); \
#endif
-#define trace_debug(FMT, args...) \
- trace_debug_1 (1, FMT, ##args)
-
/* Prefix exported symbols, for good citizenship. All the symbols
that need exporting are defined in this module. Note that all
these symbols must be tagged with IP_AGENT_EXPORT_*. */