Fix follow-fork latent bug
authorPedro Alves <palves@redhat.com>
Thu, 13 Apr 2017 15:15:34 +0000 (16:15 +0100)
committerPedro Alves <palves@redhat.com>
Thu, 13 Apr 2017 15:18:16 +0000 (16:18 +0100)
commit2a00d7ce26a6ee15e3712b045c8b7932278ea23b
treeb0f704ac4d78438257cdbf615ab68ecfea8e7cb5
parent441d7c93782a1b1877bfa903dc8da56a6041bfb4
Fix follow-fork latent bug

A later patch in the series adds an assertion to switch_to_thread that
the resulting inferior_ptid always matches the "current_inferior()"
inferior.  This exposed a latent bug in the follow-fork code, where
we're building the fork child inferior.  We're switching
inferior_ptid, but not the current inferior object...

gdb/ChangeLog:
2017-04-13  Pedro Alves  <palves@redhat.com>

* infrun.c (follow_fork_inferior): Also switch the current
inferior.
gdb/ChangeLog
gdb/infrun.c