This patches fixes a couple of left over instances of !is_running to use is_stopped instead, and adds a missing check for is_exited in get_selected_block, which I tripped on while development the yet unsubmitted non-stop remote target. I'm adding more comments to gdbthread.h to describe why. Basically, the thread state is not a boolean anymore. I'll soon post a description of these states in the internal manual under the currently empty section 3.5 - Thread Handling. Let me know if it should be placed somewhere else. Tested on x86_64-unknown-linux-gnu sync and async. OK? -- Pedro Alves