Change py-thread-exited.exp to work with gdbserver
authorTom Tromey <tromey@adacore.com>
Mon, 31 Jul 2023 17:30:30 +0000 (11:30 -0600)
committerTom Tromey <tromey@adacore.com>
Thu, 10 Aug 2023 17:42:38 +0000 (11:42 -0600)
commit78e7f66e75f93d49a7accf3a7552b2378533b52b
tree614f0f60692a0d8cb938c97c3ab3e6522d7de688
parentd0ffdf6482024331dc43d9c221c7afc5863a300b
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
gdb/testsuite/gdb.python/py-thread-exited.c
gdb/testsuite/gdb.python/py-thread-exited.exp