LLDB  mainline
ProcessKDPLog.h
Go to the documentation of this file.
1 //===-- ProcessKDPLog.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 LLDB_SOURCE_PLUGINS_PROCESS_MACOSX_KERNEL_PROCESSKDPLOG_H
10 #define LLDB_SOURCE_PLUGINS_PROCESS_MACOSX_KERNEL_PROCESSKDPLOG_H
11 
12 #include "lldb/Utility/Log.h"
13 
14 #define KDP_LOG_PROCESS (1u << 1)
15 #define KDP_LOG_THREAD (1u << 2)
16 #define KDP_LOG_PACKETS (1u << 3)
17 #define KDP_LOG_MEMORY (1u << 4) // Log memory reads/writes calls
18 #define KDP_LOG_MEMORY_DATA_SHORT \
19  (1u << 5) // Log short memory reads/writes bytes
20 #define KDP_LOG_MEMORY_DATA_LONG (1u << 6) // Log all memory reads/writes bytes
21 #define KDP_LOG_BREAKPOINTS (1u << 7)
22 #define KDP_LOG_WATCHPOINTS (1u << 8)
23 #define KDP_LOG_STEP (1u << 9)
24 #define KDP_LOG_COMM (1u << 10)
25 #define KDP_LOG_ASYNC (1u << 11)
26 #define KDP_LOG_ALL (UINT32_MAX)
27 #define KDP_LOG_DEFAULT KDP_LOG_PACKETS
28 
29 namespace lldb_private {
32 
33 public:
34  static void Initialize();
35 
37  return g_channel.GetLogIfAll(mask);
38  }
39 };
40 }
41 
42 #endif // LLDB_SOURCE_PLUGINS_PROCESS_MACOSX_KERNEL_PROCESSKDPLOG_H
lldb_private::Log::Channel::GetLogIfAll
Log * GetLogIfAll(uint32_t mask)
Definition: Log.h:77
lldb_private::ProcessKDPLog::GetLogIfAllCategoriesSet
static Log * GetLogIfAllCategoriesSet(uint32_t mask)
Definition: ProcessKDPLog.h:36
Log.h
lldb_private::ProcessKDPLog::g_channel
static Log::Channel g_channel
Definition: ProcessKDPLog.h:31
lldb_private::ProcessKDPLog
Definition: ProcessKDPLog.h:30
lldb_private::Log::Channel
Definition: Log.h:60
lldb_private::ProcessKDPLog::Initialize
static void Initialize()
Definition: ProcessKDPLog.cpp:34
uint32_t
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::Log
Definition: Log.h:49