Sped up the shutdown time on MacOSX by quite a bit by making sure any
threads that we spawn let us know when they are going away and that we
don't timeout waiting for a message from threads that have gone away.
We also now don't expect the "k" packet (kill) to send a response. This
greatly speeds up debugger shutdown performance. The test suite now runs
quite a bit faster.

Added a fix to the variable display code that fixes the display of
base classes. We were assuming the virtual or normal base class offsets
were being given in bit sizes, but they were being given as character
sizes, so we needed to multiply the offset by 8. This wasn't affecting
the expression parser, but it was affecting the correct display of C++
class base classes and all of their children.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124024 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/Process.cpp b/source/Target/Process.cpp
index 2903dad..dab3476 100644
--- a/source/Target/Process.cpp
+++ b/source/Target/Process.cpp
@@ -407,7 +407,6 @@
                                                        event_sp))
         state = Process::ProcessEventData::GetStateFromEvent(event_sp.get());
 
-    log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS);
     if (log)
         log->Printf ("Process::%s (timeout = %p, event_sp) => %s",
                      __FUNCTION__,
@@ -427,7 +426,6 @@
     Event *event_ptr;
     event_ptr = m_listener.PeekAtNextEventForBroadcasterWithType (this,
                                                                   eBroadcastBitStateChanged);
-    log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS);
     if (log)
     {
         if (event_ptr)
@@ -463,7 +461,6 @@
     // This is a bit of a hack, but when we wait here we could very well return
     // to the command-line, and that could disable the log, which would render the
     // log we got above invalid.
-    log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS);
     if (log)
         log->Printf ("Process::%s (timeout = %p, event_sp) => %s", __FUNCTION__, timeout, StateAsCString(state));
     return state;
@@ -2140,7 +2137,6 @@
                 break;
             }
             
-            log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS);
             if (log)
                 log->Printf ("Process::%s (arg = %p, pid = %i) got a control event: %d", __FUNCTION__, this, GetID(), event_sp->GetType());
 
@@ -2160,7 +2156,6 @@
             internal_state == eStateExited  ||
             internal_state == eStateDetached )
         {
-            log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS);
             if (log)
                 log->Printf ("Process::%s (arg = %p, pid = %i) about to exit with internal state %s...", __FUNCTION__, this, GetID(), StateAsCString(internal_state));
 
@@ -2169,10 +2164,11 @@
     }
 
     // Verify log is still enabled before attempting to write to it...
-    log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS);
     if (log)
         log->Printf ("Process::%s (arg = %p, pid = %i) thread exiting...", __FUNCTION__, this, GetID());
 
+    m_private_state_control_wait.SetValue (true, eBroadcastAlways);
+    m_private_state_thread = LLDB_INVALID_HOST_THREAD;
     return NULL;
 }