diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-10-31 21:50:44 +0000 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-10-31 21:58:58 +0000 |
commit | 4f0469cdd6a7637168bde415ed5dae6b1702d44e (patch) | |
tree | 4a5754c1f0e38c61d04e381c14df9064b21de775 /gdb/linux-nat.c | |
parent | 17417fb0ec9842de1774e1e76f1f11c00cdafc47 (diff) | |
download | gdb-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/linux-nat.c')
-rw-r--r-- | gdb/linux-nat.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index d79ea84..3666ed6 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -202,7 +202,12 @@ show_debug_linux_nat (struct ui_file *file, int from_tty, /* 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 { |