• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- Logging.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_UTILITY_LOGGING_H
10 #define LLDB_UTILITY_LOGGING_H
11 
12 #include <cstdint>
13 
14 // Log Bits specific to logging in lldb
15 #define LIBLLDB_LOG_PROCESS (1u << 1)
16 #define LIBLLDB_LOG_THREAD (1u << 2)
17 #define LIBLLDB_LOG_DYNAMIC_LOADER (1u << 3)
18 #define LIBLLDB_LOG_EVENTS (1u << 4)
19 #define LIBLLDB_LOG_BREAKPOINTS (1u << 5)
20 #define LIBLLDB_LOG_WATCHPOINTS (1u << 6)
21 #define LIBLLDB_LOG_STEP (1u << 7)
22 #define LIBLLDB_LOG_EXPRESSIONS (1u << 8)
23 #define LIBLLDB_LOG_TEMPORARY (1u << 9)
24 #define LIBLLDB_LOG_STATE (1u << 10)
25 #define LIBLLDB_LOG_OBJECT (1u << 11)
26 #define LIBLLDB_LOG_COMMUNICATION (1u << 12)
27 #define LIBLLDB_LOG_CONNECTION (1u << 13)
28 #define LIBLLDB_LOG_HOST (1u << 14)
29 #define LIBLLDB_LOG_UNWIND (1u << 15)
30 #define LIBLLDB_LOG_API (1u << 16)
31 #define LIBLLDB_LOG_SCRIPT (1u << 17)
32 #define LIBLLDB_LOG_COMMANDS (1U << 18)
33 #define LIBLLDB_LOG_TYPES (1u << 19)
34 #define LIBLLDB_LOG_SYMBOLS (1u << 20)
35 #define LIBLLDB_LOG_MODULES (1u << 21)
36 #define LIBLLDB_LOG_TARGET (1u << 22)
37 #define LIBLLDB_LOG_MMAP (1u << 23)
38 #define LIBLLDB_LOG_OS (1u << 24)
39 #define LIBLLDB_LOG_PLATFORM (1u << 25)
40 #define LIBLLDB_LOG_SYSTEM_RUNTIME (1u << 26)
41 #define LIBLLDB_LOG_JIT_LOADER (1u << 27)
42 #define LIBLLDB_LOG_LANGUAGE (1u << 28)
43 #define LIBLLDB_LOG_DATAFORMATTERS (1u << 29)
44 #define LIBLLDB_LOG_DEMANGLE (1u << 30)
45 #define LIBLLDB_LOG_AST (1u << 31)
46 #define LIBLLDB_LOG_ALL (UINT32_MAX)
47 #define LIBLLDB_LOG_DEFAULT                                                    \
48   (LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_THREAD | LIBLLDB_LOG_DYNAMIC_LOADER |     \
49    LIBLLDB_LOG_BREAKPOINTS | LIBLLDB_LOG_WATCHPOINTS | LIBLLDB_LOG_STEP |      \
50    LIBLLDB_LOG_STATE | LIBLLDB_LOG_SYMBOLS | LIBLLDB_LOG_TARGET |              \
51    LIBLLDB_LOG_COMMANDS)
52 
53 namespace lldb_private {
54 
55 class Log;
56 
57 Log *GetLogIfAllCategoriesSet(uint32_t mask);
58 
59 Log *GetLogIfAnyCategoriesSet(uint32_t mask);
60 
61 void InitializeLldbChannel();
62 
63 } // namespace lldb_private
64 
65 #endif // LLDB_UTILITY_LOGGING_H
66