[Lldb-commits] [lldb] r227914 - Disabled local-llgs hijacking of state on startup; passed along signo to killed process.

Chaoren Lin chaorenl at google.com
Mon Feb 2 17:50:54 PST 2015


Author: chaoren
Date: Mon Feb  2 19:50:54 2015
New Revision: 227914

URL: http://llvm.org/viewvc/llvm-project?rev=227914&view=rev
Log:
Disabled local-llgs hijacking of state on startup; passed along signo to killed process.

It looks like Shawn's fix addresses what the initial hijacking was trying
to accomplish per conversations with Greg and Jim.  The hijacking was
causing several tests to hang (#61, #62, #63, #64, #67, possibly more).
These tests now just fail rather than hang with this modification.

Modified:
    lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
    lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp

Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=227914&r1=227913&r2=227914&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp Mon Feb  2 19:50:54 2015
@@ -761,6 +761,7 @@ PlatformLinux::DebugProcess (ProcessLaun
 
     // Adjust launch for a hijacker.
     ListenerSP listener_sp;
+#if 0
     if (!launch_info.GetHijackListener ())
     {
         if (log)
@@ -770,6 +771,7 @@ PlatformLinux::DebugProcess (ProcessLaun
         launch_info.SetHijackListener (listener_sp);
         process_sp->HijackProcessEvents (listener_sp.get ());
     }
+#endif
 
     // Log file actions.
     if (log)

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp?rev=227914&r1=227913&r2=227914&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Mon Feb  2 19:50:54 2015
@@ -2303,28 +2303,17 @@ NativeProcessLinux::MonitorSIGTRAP(const
                     is_main_thread ? "is main thread" : "not main thread");
         }
 
-        // We'll set the thread to exited later...
-//        if (thread_sp)
-//            reinterpret_cast<NativeThreadLinux*> (thread_sp.get ())->SetExited ();
-//        else
-//        {
-//            if (log)
-//                log->Printf ("NativeProcessLinux::%s() pid %" PRIu64 " failed to retrieve thread for tid %" PRIu64", cannot set thread state", __FUNCTION__, GetID (), pid);
-//        }
-
-        // FIXME: review if this is the spot, or the follow up, which tells us the real exit code.
-        // If it's this one, we need to track it or set it here.  Setting it here is not really in the
-        // right time flow though unless we skip the follow up.
         if (is_main_thread)
         {
             SetExitStatus (convert_pid_status_to_exit_type (data), convert_pid_status_to_return_code (data), nullptr, true);
         }
 
+        const int signo = static_cast<int> (data);
         m_coordinator_up->RequestThreadResume (pid,
                                                [=](lldb::tid_t tid_to_resume)
                                                {
                                                    reinterpret_cast<NativeThreadLinux*> (thread_sp.get ())->SetRunning ();
-                                                   Resume (tid_to_resume, LLDB_INVALID_SIGNAL_NUMBER);
+                                                   Resume (tid_to_resume, signo);
                                                },
                                                CoordinatorErrorHandler);
 





More information about the lldb-commits mailing list