diff options
Diffstat (limited to 'gdb/sol-thread.c')
-rw-r--r-- | gdb/sol-thread.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c index ae1e5c0..0aa4595 100644 --- a/gdb/sol-thread.c +++ b/gdb/sol-thread.c @@ -605,7 +605,8 @@ check_for_thread_db (void) ptid_t ptid; /* Don't attempt to use thread_db for remote targets. */ - if (!(target_can_run () || current_program_space->core_bfd () != nullptr)) + if (!(target_can_run () + || get_inferior_core_bfd(current_inferior ()) != nullptr)) return; /* Do nothing if we couldn't load libthread_db.so.1. */ @@ -1111,19 +1112,21 @@ info_solthreads (const char *args, int from_tty) ptid_t sol_thread_target::get_ada_task_ptid (long lwp, ULONGEST thread) { - struct thread_info *thread_info - = iterate_over_threads ([&] (struct thread_info *thread) + auto thread_db_find_thread_from_tid + = [&] (struct thread_info *iter) { - return thread->ptid.tid () == thread; - }); + return iter->ptid.tid () == thread; + }; + + struct thread_info *thread_info + = iterate_over_threads (thread_db_find_thread_from_tid); if (thread_info == NULL) { /* The list of threads is probably not up to date. Find any thread that is missing from the list, and try again. */ update_thread_list (); - thread_info = iterate_over_threads (thread_db_find_thread_from_tid, - &thread); + thread_info = iterate_over_threads (thread_db_find_thread_from_tid); } gdb_assert (thread_info != NULL); @@ -1131,9 +1134,7 @@ sol_thread_target::get_ada_task_ptid (long lwp, ULONGEST thread) return (thread_info->ptid); } -void _initialize_sol_thread (); -void -_initialize_sol_thread () +INIT_GDB_FILE (sol_thread) { void *dlhandle; |