[Lldb-commits] [PATCH] Fix race condition with -o "process launch" on linux
Pavel Labath
labath at google.com
Fri Mar 6 02:55:09 PST 2015
REPOSITORY
rL LLVM
http://reviews.llvm.org/D8079
Files:
lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
lldb/trunk/source/Target/Process.cpp
Index: lldb/trunk/source/Target/Process.cpp
===================================================================
--- lldb/trunk/source/Target/Process.cpp
+++ lldb/trunk/source/Target/Process.cpp
@@ -1011,6 +1011,10 @@
if (log)
log->Printf("Process::%s returning without waiting for events; process private and public states are already 'stopped'.",
__FUNCTION__);
+ // We need to toggle the run lock as this won't get done in
+ // SetPublicState() if the process is hijacked.
+ if (hijack_listener)
+ m_public_run_lock.SetStopped();
return state;
}
Index: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
===================================================================
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
@@ -765,7 +765,6 @@
// Adjust launch for a hijacker.
ListenerSP listener_sp;
-#if 0
if (!launch_info.GetHijackListener ())
{
if (log)
@@ -775,7 +774,6 @@
launch_info.SetHijackListener (listener_sp);
process_sp->HijackProcessEvents (listener_sp.get ());
}
-#endif
// Log file actions.
if (log)
@@ -801,7 +799,6 @@
if (listener_sp)
{
const StateType state = process_sp->WaitForProcessToStop (NULL, NULL, false, listener_sp.get());
- process_sp->RestoreProcessEvents();
if (state == eStateStopped)
{
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8079.21337.patch
Type: text/x-patch
Size: 1536 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150306/dcee4467/attachment.bin>
More information about the lldb-commits
mailing list