gdbserver: When attaching, add process before lwps
The recent BP/WP changes for AArch64 swapping the order in add_lwp()
so that the process was added before the lwp. This was due to the lwp
creation requiring the process data.
This also needs changing in linux_attach().
Fixes gdb.server/ext-attach.exp on Aarch64.
(This regression was hidden due to the racy nature of the gdb.server
tests - now they are no longer racy it'll be easier to spot. Also
checked X86).
gdb/gdbserver/ChangeLog:
2019-01-25 Alan Hayward <alan.hayward@arm.com>
* linux-low.c (linux_attach): Add process before lwp.