]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: make breakpoint_debug_printf global
authorAndrew Burgess <aburgess@redhat.com>
Thu, 28 Dec 2023 22:51:22 +0000 (22:51 +0000)
committerAndrew Burgess <aburgess@redhat.com>
Sat, 7 Sep 2024 20:48:34 +0000 (21:48 +0100)
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
gdb/breakpoint.h

index 286035425a67ee4052193b736b416e7af2cb15e2..eab3b937c13d3729d7ac1329b1818030ebd55b50 100644 (file)
@@ -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
index 6294029c4d29549f56d93d55c302bfe64ec88a62..064165374fdc214d56725fe3d92567cc6bb5a599 100644 (file)
@@ -46,6 +46,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.  */