hurd: add gnu_target pointer to fix thread API calls
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 30 May 2020 18:43:25 +0000 (18:43 +0000)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 30 May 2020 18:43:25 +0000 (18:43 +0000)
commit53dff92cb56fb21dc81c183aa35a5a3ae8c06e32
tree97e776df28463ce5e3db6cfe942244a9b972894b
parent5a8b86270bbce5f9316ef7bdaa1a20b4832335ca
hurd: add gnu_target pointer to fix thread API calls

Fixes

../../gdb/gnu-nat.c:1110:28: error: cannot convert ‘ptid_t’ to ‘process_stratum_target*’
 1110 |        thread_change_ptid (inferior_ptid, ptid);

and others related to 5b6d1e4fa ("Multi-target support")

gdb/ChangeLog:

* gnu-nat.h (gnu_target): New variable declaration.
* i386-gnu-nat.c (_initialize_i386gnu_nat): Initialize
gnu_target.
* gnu-nat.c (gnu_target): New variable.
(inf_validate_procs): Pass gnu_target to thread_change_ptid,
add_thread_silent, and add_thread calls.
(gnu_nat_target::create_inferior): Pass gnu_target to
add_thread_silent, thread_change_ptid call.
(gnu_nat_target::detach): Pass gnu_target to detach_inferior
call.
gdb/ChangeLog
gdb/gnu-nat.c
gdb/gnu-nat.h
gdb/i386-gnu-nat.c