aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2020-01-21 14:45:21 -0800
committerJason Molenda <jmolenda@apple.com>2020-01-21 14:55:46 -0800
commit83a131b276426a0dc97f43c139a0f3b308f24154 (patch)
tree83dfd67a7ead88dd89e8832502881df72af7c319 /clang/lib/Frontend/CompilerInvocation.cpp
parent535ed62c5fcb9b8cd1e7abdd342277761aed29b7 (diff)
downloadllvm-83a131b276426a0dc97f43c139a0f3b308f24154.zip
llvm-83a131b276426a0dc97f43c139a0f3b308f24154.tar.gz
llvm-83a131b276426a0dc97f43c139a0f3b308f24154.tar.bz2
Fix an over-suspend bug with LaunchInNewTerminalWithAppleScript sessions
When launching an inferior in a new terminal window via AppleScript and the darwin-debug helper program, we could often end up with the inferior process having a too-high suspend count, and it would never resume execution. lldb tries to wait until darwin-debug has finished its work and has launched the inferior (WaitForProcessToSIGSTOP) but this wasn't working correctly - and cannot be made to work. This patch removes WaitForProcessToSIGSTOP, adds a special tiny segment to the darwin-debug executable so it can be identified as that binary (ExecExtraSuspend), and adds code to debugserver to detect this segment. When debugserver sees this segment, it notes that the next exec will be done with a launch-suspended flag. When the next exec happens, debugserver forces an extra task_resume when we resume the inferior. An alternative approach would be if lldb could detect when the inferior has been launched by darwin-debug unambiguously; monitoring when the unix socket between darwin-debug and lldb was closed would have been a reasonable way to do this too. <rdar://problem/29760580> Differential Revision: https://reviews.llvm.org/D72963
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions