blob: b7f59c70814313b14a204d53fc711be17f99a8a7 [file] [log] [blame]
Adrian McCarthy18a9135d2015-10-28 18:21:45 +00001//===-- 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 Turner6f9e6902017-03-03 20:56:28 +000013#include "lldb/Utility/Log.h"
Adrian McCarthy18a9135d2015-10-28 18:21:45 +000014
Kate Stoneb9c1b512016-09-06 20:57:50 +000015#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 McCarthy18a9135d2015-10-28 18:21:45 +000023
Pavel Labath3cc0e332017-02-23 13:10:38 +000024namespace lldb_private {
Kate Stoneb9c1b512016-09-06 20:57:50 +000025class ProcessWindowsLog {
Pavel Labath3cc0e332017-02-23 13:10:38 +000026 static Log::Channel g_channel;
Adrian McCarthy18a9135d2015-10-28 18:21:45 +000027
28public:
Kate Stoneb9c1b512016-09-06 20:57:50 +000029 static void Initialize();
Kate Stoneb9c1b512016-09-06 20:57:50 +000030 static void Terminate();
Adrian McCarthy18a9135d2015-10-28 18:21:45 +000031
Pavel Labath3cc0e332017-02-23 13:10:38 +000032 static Log *GetLogIfAny(uint32_t mask) { return g_channel.GetLogIfAny(mask); }
Adrian McCarthy18a9135d2015-10-28 18:21:45 +000033};
Pavel Labath3cc0e332017-02-23 13:10:38 +000034}
Adrian McCarthy18a9135d2015-10-28 18:21:45 +000035
Kate Stoneb9c1b512016-09-06 20:57:50 +000036#endif // liblldb_ProcessWindowsLog_h_