+2020-10-24 Simon Marchi <simon.marchi@efficios.com>
+
+ * linux-thread-db.c (check_pid_namespace_match): Add inferior
+ parameter and use it.
+ (thread_db_inferior_created): Pass inferior argument.
+
2020-10-24 Simon Marchi <simon.marchi@efficios.com>
* aix-thread.c (aix_thread_inferior_created): Add inferior
}
static void
-check_pid_namespace_match (void)
+check_pid_namespace_match (inferior *inf)
{
/* Check is only relevant for local targets targets. */
if (target_can_run ())
child's thread list, we'll mistakenly think it has no threads
since the thread PID fields won't match the PID we give to
libthread_db. */
- if (!linux_ns_same (inferior_ptid.pid (), LINUX_NS_PID))
+ if (!linux_ns_same (inf->pid, LINUX_NS_PID))
{
warning (_ ("Target and debugger are in different PID "
"namespaces; thread lists and other data are "
static void
thread_db_inferior_created (inferior *inf)
{
- check_pid_namespace_match ();
+ check_pid_namespace_match (inf);
check_for_thread_db ();
}