HomePhabricator

Fix race condition in process resume

Authored by labath on Oct 27 2015, 2:23 AM.

Description

Fix race condition in process resume

Summary:
Gdb-remote's async thread sent out the eBroadcastBitRunPacketSent message *before* actually
sending out the continue packet. Since it's this message the actually triggers the public state
transition, it could happen (and it did happen in TestAttachResume, which does an "process
interrupt" right after a continue) that we attempt to stop the inferior before it was actually
started (which obviously did not end well). This fixes the problem by moving the broadcast after
the packet was actually sent.

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 251399

Details

Committed
labathOct 27 2015, 2:23 AM
Differential Revision
D14083: Fix race condition in process resume
Parents
rG891c0973df53: Do not use "else" when both branches return (NFC)
Branches
Unknown
Tags
Unknown