From: Tom Tromey Date: Thu, 30 Dec 2021 19:13:52 +0000 (-0700) Subject: Always print the "host libthread-db" message to stdout X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a8e9f2575981ed1381967c4fca21808c3d869b9f;p=binutils-gdb.git Always print the "host libthread-db" message to stdout linux-thread-db.c has a bit of unusual code that unconditionally prints a message, but decides whether to print to gdb_stdout or gdb_stdlog based on a debug flag. It seems better to me to simply always print this; and this is the only spot in gdb where we conditionally pass gdb_stdout to one of the f*_unfiltered functions. --- diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c index a0cfeb1685b..18d313bf9be 100644 --- a/gdb/linux-thread-db.c +++ b/gdb/linux-thread-db.c @@ -940,21 +940,14 @@ try_thread_db_load_1 (struct thread_db_info *info) if (!libthread_db_search_path.empty () || libthread_db_debug) { - struct ui_file *file; const char *library; library = dladdr_to_soname ((const void *) *info->td_ta_new_p); if (library == NULL) library = LIBTHREAD_DB_SO; - /* If we'd print this to gdb_stdout when debug output is - disabled, still print it to gdb_stdout if debug output is - enabled. User visible output should not depend on debug - settings. */ - file = !libthread_db_search_path.empty () ? gdb_stdout : gdb_stdlog; - fprintf_unfiltered (file, - _("Using host libthread_db library \"%ps\".\n"), - styled_string (file_name_style.style (), library)); + printf_unfiltered (_("Using host libthread_db library \"%ps\".\n"), + styled_string (file_name_style.style (), library)); } /* The thread library was detected. Activate the thread_db target