[PATCH 1/2] Make 'print_thread_events' static
Tom Tromey
tom@tromey.com
Sun Jan 12 13:42:29 GMT 2025
This makes the 'print_thread_events' global static. It's never used
outside of thread.c.
---
gdb/gdbthread.h | 4 ----
gdb/thread.c | 5 +++--
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h
index ee62153551f37d177a43739921ea8f531866a19a..8b77d326b161b54decc4bccaf16107cfa4ee4b6e 100644
--- a/gdb/gdbthread.h
+++ b/gdb/gdbthread.h
@@ -866,10 +866,6 @@ extern struct cmd_list_element *thread_cmd_list;
extern void thread_command (const char *tidstr, int from_tty);
-/* Print notices on thread events (attach, detach, etc.), set with
- `set print thread-events'. */
-extern bool print_thread_events;
-
/* Prints the list of threads and their details on UIOUT. If
REQUESTED_THREADS, a list of GDB ids/ranges, is not NULL, only
print threads whose ID is included in the list. If PID is not -1,
diff --git a/gdb/thread.c b/gdb/thread.c
index 5892b158603a7d11cb7c7efc3346f01714797201..ef8a495a5a52418412fd0624f598c03d715afb5a 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -52,6 +52,9 @@
#include "interps.h"
#include "record-full.h"
+/* Print notices when new threads are attached and detached. */
+static bool print_thread_events = true;
+
/* See gdbthread.h. */
bool debug_threads = false;
@@ -2048,8 +2051,6 @@ thread_find_command (const char *arg, int from_tty)
gdb_printf (_("No threads match '%s'\n"), arg);
}
-/* Print notices when new threads are attached and detached. */
-bool print_thread_events = true;
static void
show_print_thread_events (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
--
2.46.1
More information about the Gdb-patches
mailing list