aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.h
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2020-10-31 21:50:44 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2020-10-31 21:58:58 +0000
commit4f0469cdd6a7637168bde415ed5dae6b1702d44e (patch)
tree4a5754c1f0e38c61d04e381c14df9064b21de775 /gdb/infrun.h
parent17417fb0ec9842de1774e1e76f1f11c00cdafc47 (diff)
downloadgdb-4f0469cdd6a7637168bde415ed5dae6b1702d44e.zip
gdb-4f0469cdd6a7637168bde415ed5dae6b1702d44e.tar.gz
gdb-4f0469cdd6a7637168bde415ed5dae6b1702d44e.tar.bz2
gdb: restore some checks of debug flags
This partially reverts some parts of the commit: commit 17417fb0ec9842de1774e1e76f1f11c00cdafc47 Date: Sat Oct 31 09:01:25 2020 -0400 gdb, gdbsupport: add debug_prefixed_printf, remove boilerplate functions This commit removed 3 places where some debug flags were being checked. The result was that debug tracing was being printed unconditionally. This commit adds back the 3 flag checks. gdb/ChangeLog: * 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.
Diffstat (limited to 'gdb/infrun.h')
-rw-r--r--gdb/infrun.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/gdb/infrun.h b/gdb/infrun.h
index 93b8aeb..2084d3d 100644
--- a/gdb/infrun.h
+++ b/gdb/infrun.h
@@ -34,7 +34,12 @@ extern unsigned int debug_infrun;
/* 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;
@@ -42,7 +47,12 @@ 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. */