Don't write to inferior_ptid in fork-child.c

This is no longer necessary.  All targets that call fork_inferior now
also call switch_to_thread as soon as they add the main thread.

gdb/ChangeLog:
2020-06-18  Pedro Alves  <palves@redhat.com>

	* fork-child.c (postfork_hook): Don't write to inferior_ptid.
This commit is contained in:
Pedro Alves 2020-06-18 21:28:32 +01:00
parent 5d971d48b9
commit 6d350754a3
2 changed files with 4 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2020-06-18 Pedro Alves <palves@redhat.com>
* fork-child.c (postfork_hook): Don't write to inferior_ptid.
2020-06-18 Pedro Alves <palves@redhat.com>
* bsd-kvm.c (bsd_kvm_target_open): Switch to thread after adding

View File

@ -82,9 +82,6 @@ postfork_hook (pid_t pid)
inferior_appeared (inf, pid);
/* Needed for wait_for_inferior stuff. */
inferior_ptid = ptid_t (pid);
gdb_assert (saved_ui != NULL);
current_ui = saved_ui;
saved_ui = NULL;