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.
This commit is contained in:
Samuel Thibault 2020-05-30 18:43:25 +00:00
parent 5a8b86270b
commit 53dff92cb5
4 changed files with 26 additions and 6 deletions

View file

@ -150,4 +150,7 @@ struct gnu_nat_target : public inf_child_target
void stop (ptid_t) override;
};
/* The final/concrete instance. */
extern gnu_nat_target *gnu_target;
#endif /* GNU_NAT_H */