Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 1 | //===-- ProcessWindowsLog.h -------------------------------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #ifndef liblldb_ProcessWindowsLog_h_ |
| 11 | #define liblldb_ProcessWindowsLog_h_ |
| 12 | |
Zachary Turner | 6f9e690 | 2017-03-03 20:56:28 +0000 | [diff] [blame^] | 13 | #include "lldb/Utility/Log.h" |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 14 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 15 | #define WINDOWS_LOG_PROCESS (1u << 1) // Log process operations |
| 16 | #define WINDOWS_LOG_EXCEPTION (1u << 1) // Log exceptions |
| 17 | #define WINDOWS_LOG_THREAD (1u << 2) // Log thread operations |
| 18 | #define WINDOWS_LOG_MEMORY (1u << 3) // Log memory reads/writes calls |
| 19 | #define WINDOWS_LOG_BREAKPOINTS (1u << 4) // Log breakpoint operations |
| 20 | #define WINDOWS_LOG_STEP (1u << 5) // Log step operations |
| 21 | #define WINDOWS_LOG_REGISTERS (1u << 6) // Log register operations |
| 22 | #define WINDOWS_LOG_EVENT (1u << 7) // Low level debug events |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 23 | |
Pavel Labath | 3cc0e33 | 2017-02-23 13:10:38 +0000 | [diff] [blame] | 24 | namespace lldb_private { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 25 | class ProcessWindowsLog { |
Pavel Labath | 3cc0e33 | 2017-02-23 13:10:38 +0000 | [diff] [blame] | 26 | static Log::Channel g_channel; |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 27 | |
| 28 | public: |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 29 | static void Initialize(); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 30 | static void Terminate(); |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 31 | |
Pavel Labath | 3cc0e33 | 2017-02-23 13:10:38 +0000 | [diff] [blame] | 32 | static Log *GetLogIfAny(uint32_t mask) { return g_channel.GetLogIfAny(mask); } |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 33 | }; |
Pavel Labath | 3cc0e33 | 2017-02-23 13:10:38 +0000 | [diff] [blame] | 34 | } |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 35 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 36 | #endif // liblldb_ProcessWindowsLog_h_ |