[PATCHv9,09/14] gdb: make breakpoint_debug_printf global

Message ID 2693fa8935ac65555501ad3f3d6bb1f2e6d29f9e.1709651994.git.aburgess@redhat.com
State New
Headers
Series thread-specific breakpoints in just some inferiors |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Testing passed

Commit Message

Andrew Burgess March 5, 2024, 3:21 p.m. UTC
  This commit makes breakpoint_debug_printf available outside of
breakpoint.c.  In a later commit I'll want to use this macro from
another file.

This is just a refactor, there should be no user visible changes after
this commit.
---
 gdb/breakpoint.c | 9 ++-------
 gdb/breakpoint.h | 8 ++++++++
 2 files changed, 10 insertions(+), 7 deletions(-)
  

Patch

diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index bf7c0dc042b..d940786e6d3 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -574,13 +574,8 @@  show_always_inserted_mode (struct ui_file *file, int from_tty,
 	      value);
 }
 
-/* True if breakpoint debug output is enabled.  */
-static bool debug_breakpoint = false;
-
-/* Print a "breakpoint" debug statement.  */
-#define breakpoint_debug_printf(fmt, ...) \
-  debug_prefixed_printf_cond (debug_breakpoint, "breakpoint", fmt, \
-			      ##__VA_ARGS__)
+/* See breakpoint.h.  */
+bool debug_breakpoint = false;
 
 /* "show debug breakpoint" implementation.  */
 static void
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 6da04d5ec00..24aeaf926ec 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -48,6 +48,14 @@  struct linespec_result;
 struct linespec_sals;
 struct inferior;
 
+/* True if breakpoint debug output is enabled.  */
+extern bool debug_breakpoint;
+
+/* Print a "breakpoint" debug statement.  */
+#define breakpoint_debug_printf(fmt, ...) \
+  debug_prefixed_printf_cond (debug_breakpoint, "breakpoint", fmt, \
+			      ##__VA_ARGS__)
+
 /* Enum for exception-handling support in 'catch throw', 'catch rethrow',
    'catch catch' and the MI equivalent.  */