summaryrefslogtreecommitdiffstats
path: root/lldb/tools/debugserver/source/DNBLog.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-02-12 06:28:37 +0000
committerGreg Clayton <gclayton@apple.com>2011-02-12 06:28:37 +0000
commit71fc2a33b576839d7653c8ff13dd686efe54d9db (patch)
tree25384bde96fa85c18c0e7531455a0faebe16e1f9 /lldb/tools/debugserver/source/DNBLog.cpp
parentba6ead4bc08363cba1ecf353f5c60c23cecbd443 (diff)
downloadbcm5719-llvm-71fc2a33b576839d7653c8ff13dd686efe54d9db.tar.gz
bcm5719-llvm-71fc2a33b576839d7653c8ff13dd686efe54d9db.zip
Added the ability to detect which vCont packets (using the "vCont?") packet
are supported by the remote GDB target. We can also now deal with the lack of vCont support and send packets that the remote GDB stub can use. We also error out of the continue if LLDB tries to do something too complex when vCont isn't supported. llvm-svn: 125433
Diffstat (limited to 'lldb/tools/debugserver/source/DNBLog.cpp')
-rw-r--r--lldb/tools/debugserver/source/DNBLog.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/lldb/tools/debugserver/source/DNBLog.cpp b/lldb/tools/debugserver/source/DNBLog.cpp
index 52aa0815275..21661f1dcaf 100644
--- a/lldb/tools/debugserver/source/DNBLog.cpp
+++ b/lldb/tools/debugserver/source/DNBLog.cpp
@@ -93,6 +93,9 @@ DNBLogEnabled ()
static inline void
_DNBLogVAPrintf(uint32_t flags, const char *format, va_list args)
{
+ static PThreadMutex g_LogThreadedMutex(PTHREAD_MUTEX_RECURSIVE);
+ PTHREAD_MUTEX_LOCKER(locker, g_LogThreadedMutex);
+
if (g_log_callback)
g_log_callback(g_log_baton, flags, format, args);
}
@@ -140,12 +143,6 @@ _DNBLogDebugVerbose (const char *format, ...)
}
-static pthread_mutex_t *
-GetLogThreadedMutex()
-{
- static PThreadMutex g_LogThreadedMutex(PTHREAD_MUTEX_RECURSIVE);
- return g_LogThreadedMutex.Mutex();
-}
static uint32_t g_message_id = 0;
//----------------------------------------------------------------------
@@ -157,7 +154,7 @@ _DNBLogThreaded (const char *format, ...)
{
if (DNBLogEnabled ())
{
- PTHREAD_MUTEX_LOCKER(locker, GetLogThreadedMutex());
+ //PTHREAD_MUTEX_LOCKER(locker, GetLogThreadedMutex());
char *arg_msg = NULL;
va_list args;
@@ -202,7 +199,7 @@ _DNBLogThreadedIf (uint32_t log_bit, const char *format, ...)
{
if (DNBLogEnabled () && (log_bit & g_log_bits) == log_bit)
{
- PTHREAD_MUTEX_LOCKER(locker, GetLogThreadedMutex());
+ //PTHREAD_MUTEX_LOCKER(locker, GetLogThreadedMutex());
char *arg_msg = NULL;
va_list args;
OpenPOWER on IntegriCloud