HomePhabricator

Add Read Thread to GDBRemoteCommunication

Authored by EwanCrawford on Jun 16 2015, 8:50 AM.

Description

Add Read Thread to GDBRemoteCommunication

In order to support asynchronous notifications for non-stop mode this patch adds a packet read thread. This is done by implementing AppendBytesToCache() from the communications class, which continually reads packets into a packet queue. To initialize this thread StartReadThread() must be called by the client, so since llgs and platform tools use the GBDRemoteCommunicatos code they must also call this function as well as ProcessGDBRemote.

When the read thread detects an async notify packet it broadcasts this event, where the matching listener will be added in the next non-stop patch.

Packets are now accessed by calling ReadPacket() which pops a packet from the queue, instead of using WaitForPacketWithTimeoutMicroSecondsNoLock()

Reviewers: vharron, clayborg

Subscribers: lldb-commits, labath, ted, domipheus, deepak2427

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

llvm-svn: 239824

Details

Committed
EwanCrawfordJun 16 2015, 8:50 AM
Differential Revision
D10085: Add Read Thread to GDBRemoteCommunication.
Parents
rGc81f450f1a71: Clean up redundant copies of Triple objects. NFC
Branches
Unknown
Tags
Unknown