aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/FileManager.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-01-27 09:02:32 +0000
committerGreg Clayton <gclayton@apple.com>2011-01-27 09:02:32 +0000
commit7ec3d40ec06b81c8d771ec78d6d3712da63f93fa (patch)
tree12c9b165edea08293e5b4b79be751bef83a064fe /clang/lib/Basic/FileManager.cpp
parent13e04aef2ae496acb73020461d22ad593b78cf9b (diff)
downloadllvm-7ec3d40ec06b81c8d771ec78d6d3712da63f93fa.zip
llvm-7ec3d40ec06b81c8d771ec78d6d3712da63f93fa.tar.gz
llvm-7ec3d40ec06b81c8d771ec78d6d3712da63f93fa.tar.bz2
Finally tracked down the racy condition that would hose up our debug
sessions: When continue packet has been sent and an interrupt packet was quickly sent, it would get read at the same time: $c#00\x03 There was an error where the packet end index was always being computed incorrectly by debugserver, but it wouldn't matter if there weren't extra bytes on the end (the hex \x03 interrupt byte in this case). The first '$' last 3 bytes of the data in the packet buffer were being trimmed (trying to trim the '#' + checksum (#XX)) which made: c# And this would then be passed to the handle routine for the 'c' packet which would see an extra character at the end and assume it was going to be in the form c[addr] where "[addr]" was a hex address to resume at and this would result in a malformed packet response. This is now fixed and everything works great. Another issue was issuing async packets correctly by doing correct handshakes between the thread that wants to send the async packet, and the thread that is tracking the current run. Added a write lock to the communication class as well to make sure you never get two threads trying to write data at the same time. This wasn't happening, but it is a good idea to make sure it doesn't. llvm-svn: 124369
Diffstat (limited to 'clang/lib/Basic/FileManager.cpp')
0 files changed, 0 insertions, 0 deletions