[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.
Greg Clayton via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 17 09:55:45 PST 2022
clayborg updated this revision to Diff 409700.
clayborg added a comment.
- use std::chrono for sleeping the function during polling
- we must use polling in VSCode::WaitForProcessToStop since attach doesn't deliver the initial eStateStopped event
- ignore any eStateStopped events that have a process stop ID of 1. This allows us to easily ignore the first stop that is delivered for launching, and if attaching ever does deliver this first event, it will be ignored. We do this because the IDE expects no process stopped events before "configurationDone" is completed and also because request_configurationDone() will deliver the first stop event manually _if_ we are stopping at the entry ("stopOnEntry" from launch config), else it will auto resume the process for us
- add a new "timeout" launch configuration argument for both launch and attach which defaults to 30 seconds if not specified. This controls how long we poll for the process to stop during launch or attach.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119797/new/
https://reviews.llvm.org/D119797
Files:
lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py
lldb/test/API/tools/lldb-vscode/launch/TestVSCode_launch.py
lldb/tools/lldb-vscode/VSCode.cpp
lldb/tools/lldb-vscode/VSCode.h
lldb/tools/lldb-vscode/lldb-vscode.cpp
lldb/tools/lldb-vscode/package.json
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119797.409700.patch
Type: text/x-patch
Size: 11425 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220217/46bde996/attachment-0001.bin>
More information about the lldb-commits
mailing list