diff options
author | jimingham <jingham@apple.com> | 2023-12-07 14:36:27 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-07 14:36:27 -0800 |
commit | 9d3aec5535adfdeb10a400e92cecc1cc0a5e26a6 (patch) | |
tree | c5d9dec58fde1959fc921a9c476f449198e52c88 /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | |
parent | 4a6ed4a90d6cddbbe3d25132780a72b50a457c41 (diff) | |
download | llvm-9d3aec5535adfdeb10a400e92cecc1cc0a5e26a6.zip llvm-9d3aec5535adfdeb10a400e92cecc1cc0a5e26a6.tar.gz llvm-9d3aec5535adfdeb10a400e92cecc1cc0a5e26a6.tar.bz2 |
Fix a stall in running `quit` while a live process is running (#74687)
We need to generate events when finalizing, or we won't know that we
succeeded in stopping the process to detach/kill. Instead, we stall and
then after our 20 interrupt timeout, we kill the process (even if we
were supposed to detach) and exit.
OTOH, we have to not generate events when the Process is being
destructed because shared_from_this has already been torn down, and
using it will cause crashes.
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index b043197..d5e557b 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -303,7 +303,7 @@ ProcessGDBRemote::~ProcessGDBRemote() { // make sure all of the broadcaster cleanup goes as planned. If we destruct // this class, then Process::~Process() might have problems trying to fully // destroy the broadcaster. - Finalize(); + Finalize(true /* destructing */); // The general Finalize is going to try to destroy the process and that // SHOULD shut down the async thread. However, if we don't kill it it will |