1 //===-- ProcessGDBRemoteLog.h -----------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_ProcessGDBRemoteLog_h_
11 #define liblldb_ProcessGDBRemoteLog_h_
15 // Other libraries and framework includes
18 #include "lldb/Core/Log.h"
20 #define GDBR_LOG_VERBOSE (1u << 0)
21 #define GDBR_LOG_PROCESS (1u << 1)
22 #define GDBR_LOG_THREAD (1u << 2)
23 #define GDBR_LOG_PACKETS (1u << 3)
24 #define GDBR_LOG_MEMORY (1u << 4) // Log memory reads/writes calls
25 #define GDBR_LOG_MEMORY_DATA_SHORT (1u << 5) // Log short memory reads/writes bytes
26 #define GDBR_LOG_MEMORY_DATA_LONG (1u << 6) // Log all memory reads/writes bytes
27 #define GDBR_LOG_BREAKPOINTS (1u << 7)
28 #define GDBR_LOG_WATCHPOINTS (1u << 8)
29 #define GDBR_LOG_STEP (1u << 9)
30 #define GDBR_LOG_COMM (1u << 10)
31 #define GDBR_LOG_ASYNC (1u << 11)
32 #define GDBR_LOG_ALL (UINT32_MAX)
33 #define GDBR_LOG_DEFAULT GDBR_LOG_PACKETS
35 class ProcessGDBRemoteLog
38 static lldb_private::Log *
39 GetLogIfAllCategoriesSet(uint32_t mask = 0);
41 static lldb_private::Log *
42 GetLogIfAnyCategoryIsSet (uint32_t mask);
45 DisableLog (const char **categories, lldb_private::Stream *feedback_strm);
47 static lldb_private::Log *
48 EnableLog (lldb::StreamSP &log_stream_sp, uint32_t log_options, const char **categories, lldb_private::Stream *feedback_strm);
51 ListLogCategories (lldb_private::Stream *strm);
54 LogIf (uint32_t mask, const char *format, ...);
57 #endif // liblldb_ProcessGDBRemoteLog_h_