diff options
Diffstat (limited to 'gdb/linux-thread-db.c')
-rw-r--r-- | gdb/linux-thread-db.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c index 018bd68..8d49508 100644 --- a/gdb/linux-thread-db.c +++ b/gdb/linux-thread-db.c @@ -1,6 +1,6 @@ /* libthread_db assisted debugging support, generic parts. - Copyright (C) 1999-2024 Free Software Foundation, Inc. + Copyright (C) 1999-2025 Free Software Foundation, Inc. This file is part of GDB. @@ -467,11 +467,11 @@ verbose_dlsym (void *handle, const char *name) static int inferior_has_bug (const char *ver_symbol, int ver_major_min, int ver_minor_min) { - struct bound_minimal_symbol version_msym; CORE_ADDR version_addr; int got, retval = 0; - version_msym = lookup_minimal_symbol (ver_symbol, NULL, NULL); + bound_minimal_symbol version_msym + = lookup_minimal_symbol (current_program_space, ver_symbol); if (version_msym.minsym == NULL) return 0; @@ -778,9 +778,6 @@ check_thread_db (struct thread_db_info *info, bool log_progress) } catch (const gdb_exception_error &except) { - if (warning_pre_print) - gdb_puts (warning_pre_print, gdb_stderr); - exception_fprintf (gdb_stderr, except, _("libthread_db integrity checks failed: ")); @@ -810,9 +807,8 @@ static bool libpthread_objfile_p (objfile *obj) { return (libpthread_name_p (objfile_name (obj)) - && lookup_minimal_symbol ("pthread_create", - NULL, - obj).minsym != NULL); + && lookup_minimal_symbol (current_program_space, + "pthread_create", obj).minsym != nullptr); } /* Attempt to initialize dlopen()ed libthread_db, described by INFO. @@ -1985,9 +1981,7 @@ maintenance_check_libthread_db (const char *args, int from_tty) check_thread_db (info, true); } -void _initialize_thread_db (); -void -_initialize_thread_db () +INIT_GDB_FILE (thread_db) { /* Defer loading of libthread_db.so until inferior is running. This allows gdb to load correct libthread_db for a given |