remote packet sent after Ravenscar inferior exited
When debugging a program using the Ravenscar profile, the debugger
sometimes tries to send the following packet to the remote after
the inferior exited.
(gdb) c
Continuing.
[...]
Sending packet: $vCont;c:1#13...Ack
Packet received: W00
Sending packet: $Hg1#e0...putpkt: write failed: Broken pipe.
As the inferior exited, the remote has already disconnected, and thus
the operation fails.
The reason why GDB sends the package is because the ravenscar-thread
module tries to updates the list of threads. But this doesn't make
sense, since the program has exited. This patch fixes it.
gdb/ChangeLog:
* ravenscar-thread.c (ravenscar_wait): Only update the list
of threads and inferior_ptid if the inferior is still alive.