1 //===-- ProcessPOSIXLog.h -----------------------------------------*- C++
4 // The LLVM Compiler Infrastructure
6 // This file is distributed under the University of Illinois Open Source
7 // License. See LICENSE.TXT for details.
9 //===----------------------------------------------------------------------===//
11 #ifndef liblldb_ProcessPOSIXLog_h_
12 #define liblldb_ProcessPOSIXLog_h_
15 #include "lldb/Utility/Log.h"
17 #define POSIX_LOG_PROCESS (1u << 1)
18 #define POSIX_LOG_THREAD (1u << 2)
19 #define POSIX_LOG_MEMORY (1u << 4) // Log memory reads/writes calls
20 #define POSIX_LOG_PTRACE (1u << 5)
21 #define POSIX_LOG_REGISTERS (1u << 6)
22 #define POSIX_LOG_BREAKPOINTS (1u << 7)
23 #define POSIX_LOG_WATCHPOINTS (1u << 8)
24 #define POSIX_LOG_ALL (UINT32_MAX)
25 #define POSIX_LOG_DEFAULT POSIX_LOG_PROCESS
27 namespace lldb_private {
28 class ProcessPOSIXLog {
29 static Log::Channel g_channel;
32 static void Initialize();
34 static Log *GetLogIfAllCategoriesSet(uint32_t mask) {
35 return g_channel.GetLogIfAll(mask);
40 #endif // liblldb_ProcessPOSIXLog_h_