Conditionally restore displaced stepping state after fork.
There is no default method for
gdbarch_displaced_step_restore_all_in_ptid, so calling it
unconditionally for fork events triggered an assertion failure on
platforms that do not support displaced stepping. To fix, only invoke
the method if the gdbarch supports displaced stepping.
Note that not all gdbarches support both displaced stepping and fork
events, so gdbarch validation does not require
gdbarch_displaced_step_restore_all_in_ptid for any gdbarch supporting
displaced stepping. However, the internal assertion in
gdbarch_displaced_step_restore_all_in_ptid should catch any gdbarches
which do support both but fail to provide this method.
gdb/ChangeLog:
* infrun.c (handle_inferior_event): Only call
gdbarch_displaced_step_restore_all_in_ptid if
gdbarch_supports_displaced_stepping is true.