diff options
author | Andrew Burgess <aburgess@redhat.com> | 2023-12-28 22:51:22 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2024-09-07 21:48:34 +0100 |
commit | 4764e22161c68806444a6484cc5314b56071c647 (patch) | |
tree | e3b9cb09490381e0fe078bee0c75bdc6a9af1c59 | |
parent | 26d23d8e0242af67db3d2317b75ca783cdadd5b5 (diff) | |
download | gdb-4764e22161c68806444a6484cc5314b56071c647.zip gdb-4764e22161c68806444a6484cc5314b56071c647.tar.gz gdb-4764e22161c68806444a6484cc5314b56071c647.tar.bz2 |
gdb: make breakpoint_debug_printf global
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.
-rw-r--r-- | gdb/breakpoint.c | 9 | ||||
-rw-r--r-- | gdb/breakpoint.h | 8 |
2 files changed, 10 insertions, 7 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 2860354..eab3b93 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 6294029..0641653 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -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. */ |