+2020-10-31 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * infrun.h (infrun_debug_printf): Add check of debug_infrun flag.
+ (debug_prefixed_printf): Add check of debug_displaced flag.
+ * linux-nat.c (linux_nat_debug_printf): Add check of
+ debug_linux_nat flag.
+
2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
* infrun.c (infrun_debug_printf_1): Remove.
/* Print an "infrun" debug statement. */
#define infrun_debug_printf(fmt, ...) \
- debug_prefixed_printf ("infrun", __func__, fmt, ##__VA_ARGS__)
+ do \
+ { \
+ if (debug_infrun) \
+ debug_prefixed_printf ("infrun", __func__, fmt, ##__VA_ARGS__); \
+ } \
+ while (0)
/* True if we are debugging displaced stepping. */
extern bool debug_displaced;
/* Print a "displaced" debug statement. */
#define displaced_debug_printf(fmt, ...) \
- debug_prefixed_printf ("displaced", __func__, fmt, ##__VA_ARGS__)
+ do \
+ { \
+ if (debug_displaced) \
+ debug_prefixed_printf ("displaced", __func__, fmt, ##__VA_ARGS__); \
+ } \
+ while (0)
/* Nonzero if we want to give control to the user when we're notified
of shared library events by the dynamic linker. */
/* Print a linux-nat debug statement. */
#define linux_nat_debug_printf(fmt, ...) \
- debug_prefixed_printf ("linux-nat", __func__, fmt, ##__VA_ARGS__)
+ do \
+ { \
+ if (debug_linux_nat) \
+ debug_prefixed_printf ("linux-nat", __func__, fmt, ##__VA_ARGS__); \
+ } \
+ while (0)
struct simple_pid_list
{