[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.

2022-03-08 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. It worked. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119797/new/ https://reviews.llvm.org/D119797 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lis

[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.

2022-03-07 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. Herald added a project: All. Here is the diff that should fix things: https://reviews.llvm.org/rGc41c57468949 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119797/new/ https://reviews.llvm.org/D119797 ___

[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.

2022-02-18 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. There's also a timeout in TestVSCode_coreFile.py Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119797/new/ https://reviews.llvm.org/D119797 ___ lldb-commits mailing list lldb-comm

[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.

2022-02-18 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. TestVSCode_attach.py is still failing. Are you able to fix that quickly or shall we revert? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119797/new/ https://review

[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.

2022-02-18 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. Fixed buildbots with: commit 38054556a08884aa15d3ebc720e2f43d0cb5a944 (HEAD -> main, origin/main, origin/HEAD) Author: Greg Clayton Date: Thu Feb 17 23:59:15 2022 -0800 Fix buildbots after https://reviews.llvm.org/D119797 This value error

[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.

2022-02-17 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. In D119797#3331419 , @omjavaid wrote: > Hi @clayborg this rev has caused some lldb-vscode test failures across all > LLDB/Linux buildbots. tracking this down now Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.

2022-02-17 Thread Muhammad Omair Javaid via Phabricator via lldb-commits
omjavaid added a comment. Hi @clayborg this rev has caused some lldb-vscode test failures across all LLDB/Linux buildbots. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119797/new/ https://reviews.llvm.org/D119797

[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.

2022-02-17 Thread Greg Clayton via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. clayborg marked 2 inline comments as done. Closed by commit rG9febd1e573fb: Fix race condition when launching and attaching. (authored by clayborg). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.

2022-02-17 Thread walter erquinigo via Phabricator via lldb-commits
wallace accepted this revision. wallace added a comment. This revision is now accepted and ready to land. lgtm Comment at: lldb/tools/lldb-vscode/VSCode.cpp:533 + // Wait for the process hit a stopped state. When running a launch (with or + // without "launchCommands") or att

[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.

2022-02-17 Thread Greg Clayton via Phabricator via lldb-commits
clayborg marked 2 inline comments as done. clayborg added a comment. In D119797#3321924 , @labath wrote: > Instead of polling, would it be possible for the event handler thread to send > a notification (through a condition variable, std::future, etc.), a

[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.

2022-02-17 Thread Greg Clayton via Phabricator via lldb-commits
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 proc

[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.

2022-02-15 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment. I agree with labath. Specially because I wouldn't like the user having aborted debug sessions if their setup takes longer than 10 seconds to get the process ready, which I imagine might happen with android or oculus devices using custom launch configs. What about using

[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.

2022-02-15 Thread jeffrey tan via Phabricator via lldb-commits
yinghuitan added inline comments. Comment at: lldb/tools/lldb-vscode/VSCode.cpp:545 + } + const useconds_t usleep_interval = 250 * 1; // 250 ms internal + const useconds_t count = (seconds * 1000 * 1000)/usleep_interval; Is this a typo? It should be 1000 i

[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.

2022-02-15 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Instead of polling, would it be possible for the event handler thread to send a notification (through a condition variable, std::future, etc.), and have the main thread wait for that? But in general, avoiding flipping the modes back and forth seems like a good idea.

[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.

2022-02-14 Thread Ilya Nozhkin via Phabricator via lldb-commits
ilya-nozhkin added inline comments. Comment at: lldb/tools/lldb-vscode/VSCode.cpp:9 +#include #include Incompatible with MSVC. Maybe use std::chrono instead? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D11979

[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.

2022-02-14 Thread Greg Clayton via Phabricator via lldb-commits
clayborg created this revision. clayborg added reviewers: labath, JDevlieghere, jingham, aadsm, wallace, ilya-nozhkin. clayborg requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. We discovered that when using "launchCommands" or "attachComman