1 //===-- ProcessPOSIXLog.h -----------------------------------------*- C++ 2 //-*-===// 3 // 4 // The LLVM Compiler Infrastructure 5 // 6 // This file is distributed under the University of Illinois Open Source 7 // License. See LICENSE.TXT for details. 8 // 9 //===----------------------------------------------------------------------===// 10 11 #ifndef liblldb_ProcessPOSIXLog_h_ 12 #define liblldb_ProcessPOSIXLog_h_ 13 14 15 #include "lldb/Utility/Log.h" 16 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 26 27 namespace lldb_private { 28 class ProcessPOSIXLog { 29 static Log::Channel g_channel; 30 31 public: 32 static void Initialize(); 33 34 static Log *GetLogIfAllCategoriesSet(uint32_t mask) { 35 return g_channel.GetLogIfAll(mask); 36 } 37 }; 38 } 39 40 #endif // liblldb_ProcessPOSIXLog_h_ 41