diff options
author | Pavel Labath <labath@google.com> | 2017-02-23 13:10:38 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2017-02-23 13:10:38 +0000 |
commit | 3cc0e33ea245bf0f165f82a6d599043a5b6c6102 (patch) | |
tree | e476e6e578aa809fa3d2152d04be6709f60dc570 /lldb/source/Plugins/Process/Windows/Common/ProcessWindowsLog.h | |
parent | 7654191e703ec7c9433885b8c4e38d20381dff2c (diff) | |
download | bcm5719-llvm-3cc0e33ea245bf0f165f82a6d599043a5b6c6102.tar.gz bcm5719-llvm-3cc0e33ea245bf0f165f82a6d599043a5b6c6102.zip |
Switch "windows" log channel to the new registration mechanism
llvm-svn: 295968
Diffstat (limited to 'lldb/source/Plugins/Process/Windows/Common/ProcessWindowsLog.h')
-rw-r--r-- | lldb/source/Plugins/Process/Windows/Common/ProcessWindowsLog.h | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/lldb/source/Plugins/Process/Windows/Common/ProcessWindowsLog.h b/lldb/source/Plugins/Process/Windows/Common/ProcessWindowsLog.h index fed318f00c9..6e621739c79 100644 --- a/lldb/source/Plugins/Process/Windows/Common/ProcessWindowsLog.h +++ b/lldb/source/Plugins/Process/Windows/Common/ProcessWindowsLog.h @@ -12,7 +12,6 @@ #include "lldb/Core/Log.h" -#define WINDOWS_LOG_VERBOSE (1u << 0) #define WINDOWS_LOG_PROCESS (1u << 1) // Log process operations #define WINDOWS_LOG_EXCEPTION (1u << 1) // Log exceptions #define WINDOWS_LOG_THREAD (1u << 2) // Log thread operations @@ -21,40 +20,17 @@ #define WINDOWS_LOG_STEP (1u << 5) // Log step operations #define WINDOWS_LOG_REGISTERS (1u << 6) // Log register operations #define WINDOWS_LOG_EVENT (1u << 7) // Low level debug events -#define WINDOWS_LOG_ALL (UINT32_MAX) - -enum class LogMaskReq { All, Any }; +namespace lldb_private { class ProcessWindowsLog { - static const char *m_pluginname; + static Log::Channel g_channel; public: - // --------------------------------------------------------------------- - // Public Static Methods - // --------------------------------------------------------------------- static void Initialize(); - static void Terminate(); - static void RegisterPluginName(const char *pluginName) { - m_pluginname = pluginName; - } - - static void RegisterPluginName(lldb_private::ConstString pluginName) { - m_pluginname = pluginName.GetCString(); - } - - static lldb_private::Log *GetLogIfAny(uint32_t mask); - - static void DisableLog(const char **args, - lldb_private::Stream *feedback_strm); - - static lldb_private::Log * - EnableLog(const std::shared_ptr<llvm::raw_ostream> &log_stream_sp, - uint32_t log_options, const char **args, - lldb_private::Stream *feedback_strm); - - static void ListLogCategories(lldb_private::Stream *strm); + static Log *GetLogIfAny(uint32_t mask) { return g_channel.GetLogIfAny(mask); } }; +} #endif // liblldb_ProcessWindowsLog_h_ |