Add handling of async notify packets
authorEwan Crawford <ewan@codeplay.com>
Tue, 23 Jun 2015 12:32:06 +0000 (12:32 +0000)
committerEwan Crawford <ewan@codeplay.com>
Tue, 23 Jun 2015 12:32:06 +0000 (12:32 +0000)
commit76df2881ba4996ea728b985f8d7e13ba266e40f3
tree03961d8906c6985e95ac79b1792b1c528fcdd908
parent3fd22703b69fed32345c786d70ef12471d784301
Add handling of async notify packets

This patch adds a listener to the AynscThread in ProcessGDBRemote, specifically for dealing with any async notification packets.

From the broadcast our listener receives we can process the notify packet from the event data. A handler function then sets the thread stop info from this packet, and updates lldb by setting the process private state to stopped. Allowing the async thread to go back to sleep and getting the main thread to handle the implications of a state change.

When sending a vCont in nonstop mode we also get a different reply from all-stop mode, an OK response as opposed to a stop reply. So a condition is added to handle this and set the process state without the stop-reply data.

Reviewers: clayborg

Subscribers: lldb-commits, labath, ted, aidan.dodds, deepak2427

Differential Revision: http://reviews.llvm.org/D10544

llvm-svn: 240397
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h