• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- LogChannelDWARF.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_SYMBOLFILE_DWARF_LOGCHANNELDWARF_H
10 #define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_LOGCHANNELDWARF_H
11 
12 #include "lldb/Utility/Log.h"
13 
14 #define DWARF_LOG_DEBUG_INFO (1u << 1)
15 #define DWARF_LOG_DEBUG_LINE (1u << 2)
16 #define DWARF_LOG_LOOKUPS (1u << 3)
17 #define DWARF_LOG_TYPE_COMPLETION (1u << 4)
18 #define DWARF_LOG_DEBUG_MAP (1u << 5)
19 #define DWARF_LOG_ALL (UINT32_MAX)
20 #define DWARF_LOG_DEFAULT (DWARF_LOG_DEBUG_INFO)
21 
22 namespace lldb_private {
23 class LogChannelDWARF {
24   static Log::Channel g_channel;
25 
26 public:
27   static void Initialize();
28   static void Terminate();
29 
GetLogIfAll(uint32_t mask)30   static Log *GetLogIfAll(uint32_t mask) { return g_channel.GetLogIfAll(mask); }
GetLogIfAny(uint32_t mask)31   static Log *GetLogIfAny(uint32_t mask) { return g_channel.GetLogIfAny(mask); }
32 };
33 }
34 
35 #endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_LOGCHANNELDWARF_H
36