[Lldb-commits] [PATCH] D105698: [lldb/Target] Fix event handling during process launch
Med Ismail Bennani via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jul 9 06:14:00 PDT 2021
mib created this revision.
mib added a reviewer: jingham.
mib requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
This patch fixes process event handling when the events are broadcasted
at launch. To do so, the patch introduces a new listener to ensure the
event ordering.
Signed-off-by: Med Ismail Bennani <medismail.bennani at gmail.com>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D105698
Files:
lldb/source/Target/Process.cpp
Index: lldb/source/Target/Process.cpp
===================================================================
--- lldb/source/Target/Process.cpp
+++ lldb/source/Target/Process.cpp
@@ -10,6 +10,7 @@
#include <memory>
#include <mutex>
+#include "llvm/ADT/ScopeExit.h"
#include "llvm/Support/ScopedPrinter.h"
#include "llvm/Support/Threading.h"
@@ -2470,6 +2471,11 @@
if (error.Fail())
return error;
+ // Listen and queue events that are broadcasted during the process launch.
+ ListenerSP listener_sp(Listener::MakeListener("LaunchEventHijack"));
+ HijackProcessEvents(listener_sp);
+ auto on_exit = llvm::make_scope_exit([this]() { RestoreProcessEvents(); });
+
if (PrivateStateThreadIsValid())
PausePrivateStateThread();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105698.357493.patch
Type: text/x-patch
Size: 765 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210709/c506f6ce/attachment.bin>
More information about the lldb-commits
mailing list