summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBServerLog.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-07-09 20:39:50 +0000
committerGreg Clayton <gclayton@apple.com>2010-07-09 20:39:50 +0000
commitc982c768d248b21b82fbd70b61a4cc824cd82ddc (patch)
tree68c5d417ce51994a2d393e5a5a7f0025b6e4ed35 /lldb/source/Plugins/Process/gdb-remote/GDBServerLog.cpp
parent2a5725b1a324639d0e16e9c125f5713acfabca60 (diff)
downloadbcm5719-llvm-c982c768d248b21b82fbd70b61a4cc824cd82ddc.tar.gz
bcm5719-llvm-c982c768d248b21b82fbd70b61a4cc824cd82ddc.zip
Merged Eli Friedman's linux build changes where he added Makefile files that
enabled LLVM make style building and made this compile LLDB on Mac OS X. We can now iterate on this to make the build work on both linux and macosx. llvm-svn: 108009
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBServerLog.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBServerLog.cpp80
1 files changed, 0 insertions, 80 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBServerLog.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBServerLog.cpp
deleted file mode 100644
index 2d4116ebe7b..00000000000
--- a/lldb/source/Plugins/Process/gdb-remote/GDBServerLog.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-//===-- GDBServerLog.cpp ----------------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//----------------------------------------------------------------------
-//
-// GDBServerLog.cpp
-// liblldb
-//
-// Created by Greg Clayton on 6/19/09.
-//
-//
-//----------------------------------------------------------------------
-
-#include "GDBServerLog.h"
-
-using namespace lldb;
-
-static Log *
-LogAccessor (bool get, Log *log)
-{
- static Log* g_log = NULL; // Leak for now as auto_ptr was being cleaned up
- // by global constructors before other threads
- // were done with it.
- if (get)
- {
-// // Debug code below for enabling logging by default
-// if (g_log == NULL)
-// {
-// g_log = new Log("/dev/stdout", false);
-// g_log->GetMask().SetAllFlagBits(GS_LOG_ALL);
-// g_log->GetOptions().Set(LLDB_LOG_OPTION_THREADSAFE | LLDB_LOG_OPTION_PREPEND_THREAD_NAME);
-// }
- }
- else
- {
- if (g_log)
- delete g_log;
- g_log = log;
- }
-
- return g_log;
-}
-
-Log *
-GDBServerLog::GetLogIfAllCategoriesSet (uint32_t mask)
-{
- Log *log = LogAccessor (true, NULL);
- if (log && mask)
- {
- uint32_t log_mask = log->GetMask().GetAllFlagBits();
- if ((log_mask & mask) != mask)
- return NULL;
- }
- return log;
-}
-
-void
-GDBServerLog::SetLog (Log *log)
-{
- LogAccessor (false, log);
-}
-
-
-void
-GDBServerLog::LogIf (uint32_t mask, const char *format, ...)
-{
- Log *log = GDBServerLog::GetLogIfAllCategoriesSet (mask);
- if (log)
- {
- va_list args;
- va_start (args, format);
- log->VAPrintf (format, args);
- va_end (args);
- }
-}
OpenPOWER on IntegriCloud