remote packet sent after Ravenscar inferior exited
authorJoel Brobecker <brobecker@gnat.com>
Wed, 24 Oct 2012 18:19:50 +0000 (18:19 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Wed, 24 Oct 2012 18:19:50 +0000 (18:19 +0000)
commitbed0c2439825684b1f7a34bcc2e49acfafe3bb4c
tree2f1bac571897fbea3ea5e7df497ab7fefdbe31e2
parentf69c91ad24e3704234ffde45557fc5edddd7af8a
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.
gdb/ChangeLog
gdb/ravenscar-thread.c