aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-12-30 12:13:52 -0700
committerTom Tromey <tom@tromey.com>2022-01-25 15:22:49 -0700
commita8e9f2575981ed1381967c4fca21808c3d869b9f (patch)
tree5e2a6244a1b9ca8382a4d4447a0db0386773897c /gdb
parentd4396e0e97d21ad766089748fde1e11257384c49 (diff)
downloadgdb-a8e9f2575981ed1381967c4fca21808c3d869b9f.zip
gdb-a8e9f2575981ed1381967c4fca21808c3d869b9f.tar.gz
gdb-a8e9f2575981ed1381967c4fca21808c3d869b9f.tar.bz2
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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/linux-thread-db.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index a0cfeb1..18d313b 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