summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.h
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2017-02-17 15:08:08 +0000
committerPavel Labath <labath@google.com>2017-02-17 15:08:08 +0000
commit7b35b781603b5d7d5be866a47d84fab8d96729ab (patch)
treeddb426ea15771a37e1c8a7994a294a66e799e640 /lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.h
parentf891e90b356af939f78b8b32359207dd412c6ac1 (diff)
downloadbcm5719-llvm-7b35b781603b5d7d5be866a47d84fab8d96729ab.tar.gz
bcm5719-llvm-7b35b781603b5d7d5be866a47d84fab8d96729ab.zip
Switch ProcessKDPLog to the new channel registration mechanism
llvm-svn: 295450
Diffstat (limited to 'lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.h')
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.h25
1 files changed, 8 insertions, 17 deletions
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.h b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.h
index 9d8b55f2c69..815c0e0cfc8 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.h
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.h
@@ -10,11 +10,6 @@
#ifndef liblldb_ProcessKDPLog_h_
#define liblldb_ProcessKDPLog_h_
-// C Includes
-// C++ Includes
-// Other libraries and framework includes
-
-// Project includes
#include "lldb/Core/Log.h"
#define KDP_LOG_PROCESS (1u << 1)
@@ -32,21 +27,17 @@
#define KDP_LOG_ALL (UINT32_MAX)
#define KDP_LOG_DEFAULT KDP_LOG_PACKETS
+namespace lldb_private {
class ProcessKDPLog {
-public:
- static lldb_private::Log *GetLogIfAllCategoriesSet(uint32_t mask = 0);
-
- static void DisableLog(const char **categories,
- lldb_private::Stream *feedback_strm);
+ static Log::Channel g_channel;
- static lldb_private::Log *
- EnableLog(const std::shared_ptr<llvm::raw_ostream> &log_stream_sp,
- uint32_t log_options, const char **categories,
- lldb_private::Stream *feedback_strm);
-
- static void ListLogCategories(lldb_private::Stream *strm);
+public:
+ static void Initialize();
- static void LogIf(uint32_t mask, const char *format, ...);
+ static Log *GetLogIfAllCategoriesSet(uint32_t mask) {
+ return g_channel.GetLogIfAll(mask);
+ }
};
+}
#endif // liblldb_ProcessKDPLog_h_
OpenPOWER on IntegriCloud