Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 1 | //===-- ProcessWindowsLog.h -------------------------------------*- C++ -*-===// |
| 2 | // |
Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #ifndef liblldb_ProcessWindowsLog_h_ |
| 10 | #define liblldb_ProcessWindowsLog_h_ |
| 11 | |
Zachary Turner | 6f9e690 | 2017-03-03 20:56:28 +0000 | [diff] [blame] | 12 | #include "lldb/Utility/Log.h" |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 13 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 14 | #define WINDOWS_LOG_PROCESS (1u << 1) // Log process operations |
| 15 | #define WINDOWS_LOG_EXCEPTION (1u << 1) // Log exceptions |
| 16 | #define WINDOWS_LOG_THREAD (1u << 2) // Log thread operations |
| 17 | #define WINDOWS_LOG_MEMORY (1u << 3) // Log memory reads/writes calls |
| 18 | #define WINDOWS_LOG_BREAKPOINTS (1u << 4) // Log breakpoint operations |
| 19 | #define WINDOWS_LOG_STEP (1u << 5) // Log step operations |
| 20 | #define WINDOWS_LOG_REGISTERS (1u << 6) // Log register operations |
| 21 | #define WINDOWS_LOG_EVENT (1u << 7) // Low level debug events |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 22 | |
Pavel Labath | 3cc0e33 | 2017-02-23 13:10:38 +0000 | [diff] [blame] | 23 | namespace lldb_private { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 24 | class ProcessWindowsLog { |
Pavel Labath | 3cc0e33 | 2017-02-23 13:10:38 +0000 | [diff] [blame] | 25 | static Log::Channel g_channel; |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 26 | |
| 27 | public: |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 28 | static void Initialize(); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 29 | static void Terminate(); |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 30 | |
Pavel Labath | 3cc0e33 | 2017-02-23 13:10:38 +0000 | [diff] [blame] | 31 | static Log *GetLogIfAny(uint32_t mask) { return g_channel.GetLogIfAny(mask); } |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 32 | }; |
Pavel Labath | 3cc0e33 | 2017-02-23 13:10:38 +0000 | [diff] [blame] | 33 | } |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 34 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 35 | #endif // liblldb_ProcessWindowsLog_h_ |