Change py-thread-exited.exp to work with gdbserver
gdbserver does not notify gdb of new threads when they are created.
I'm not sure if this is documented anywhere, but it is mentioned on
this page:
https://sourceware.org/gdb/wiki/LocalRemoteFeatureParity
Search for "Finding new threads in the inferior".
This behavior is a bit unfortunate -- I would think that it would be
better to arrange for such notification if something on the gdb side
is interested.
Meanwhile, this patch fixes py-thread-exited.exp to work around this
problem.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30677