From: Tom Tromey Date: Sun, 12 Jan 2025 00:35:59 +0000 (-0700) Subject: Make 'print_thread_events' static X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3bcc054af09337028ea431de45346893ad7625c;p=thirdparty%2Fbinutils-gdb.git Make 'print_thread_events' static This makes the 'print_thread_events' global static. It's never used outside of thread.c. Reviewed-by: Stephan Rohr --- diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h index 015da36ca71..68d7aebbbf7 100644 --- a/gdb/gdbthread.h +++ b/gdb/gdbthread.h @@ -864,10 +864,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 2c5292d24b7..98228fc144c 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -51,6 +51,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; @@ -2059,8 +2062,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)