[Lldb-commits] [PATCH] D119548: [lldb] Fix race condition between lldb-vscode and stop hooks executor
Ilya Nozhkin via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 17 08:00:39 PST 2022
ilya-nozhkin updated this revision to Diff 409655.
ilya-nozhkin added a comment.
Made requested changes.
I agree with @jingham that if the listener is passed via launch info then we don't need to activate it in `CreateProcess`. I mean, activating it in `CreateProcess` was a hack that allowed me to hijack events regardless of platform implementation. But if the listener is passed via launch info then platforms should redirect it to `CreateProcess` anyway. So, why not activate the listener in the platform's code? On the one hand, it creates unnecessary code duplication but on the other hand, it makes responsibilities of `CreateProcess` clearer. A possible compromise is to create a new method `Target::PrepareProcessForLaunch` and set up the hijacker there.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119548/new/
https://reviews.llvm.org/D119548
Files:
lldb/include/lldb/Target/Process.h
lldb/packages/Python/lldbsuite/test/lldbtest.py
lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py
lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
lldb/source/Plugins/Platform/QemuUser/PlatformQemuUser.cpp
lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
lldb/source/Target/Process.cpp
lldb/source/Target/Target.cpp
lldb/test/API/tools/lldb-vscode/stop-hooks/Makefile
lldb/test/API/tools/lldb-vscode/stop-hooks/TestVSCode_stop_hooks.py
lldb/test/API/tools/lldb-vscode/stop-hooks/main.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119548.409655.patch
Type: text/x-patch
Size: 20308 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220217/0a95bd03/attachment-0001.bin>
More information about the lldb-commits
mailing list