LLDB  mainline
ProcessGDBRemoteLog.h
Go to the documentation of this file.
1 //===-- ProcessGDBRemoteLog.h -----------------------------------*- C++ -*-===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef liblldb_ProcessGDBRemoteLog_h_
10 #define liblldb_ProcessGDBRemoteLog_h_
11 
12 
13 #include "lldb/Utility/Log.h"
14 
15 #define GDBR_LOG_PROCESS (1u << 1)
16 #define GDBR_LOG_THREAD (1u << 2)
17 #define GDBR_LOG_PACKETS (1u << 3)
18 #define GDBR_LOG_MEMORY (1u << 4) // Log memory reads/writes calls
19 #define GDBR_LOG_MEMORY_DATA_SHORT \
20  (1u << 5) // Log short memory reads/writes bytes
21 #define GDBR_LOG_MEMORY_DATA_LONG (1u << 6) // Log all memory reads/writes bytes
22 #define GDBR_LOG_BREAKPOINTS (1u << 7)
23 #define GDBR_LOG_WATCHPOINTS (1u << 8)
24 #define GDBR_LOG_STEP (1u << 9)
25 #define GDBR_LOG_COMM (1u << 10)
26 #define GDBR_LOG_ASYNC (1u << 11)
27 #define GDBR_LOG_ALL (UINT32_MAX)
28 #define GDBR_LOG_DEFAULT GDBR_LOG_PACKETS
29 
30 namespace lldb_private {
31 namespace process_gdb_remote {
32 
34  static Log::Channel g_channel;
35 
36 public:
37  static void Initialize();
38 
39  static Log *GetLogIfAllCategoriesSet(uint32_t mask) { return g_channel.GetLogIfAll(mask); }
40  static Log *GetLogIfAnyCategoryIsSet(uint32_t mask) { return g_channel.GetLogIfAny(mask); }
41 };
42 
43 } // namespace process_gdb_remote
44 } // namespace lldb_private
45 
46 #endif // liblldb_ProcessGDBRemoteLog_h_
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
Log * GetLogIfAll(uint32_t mask)
Definition: Log.h:76
Log * GetLogIfAny(uint32_t mask)
Definition: Log.h:87