1 //===-- LogChannelDWARF.cpp ------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #include "LogChannelDWARF.h"
11 
12 using namespace lldb;
13 using namespace lldb_private;
14 
15 static constexpr Log::Category g_categories[] = {
16     {{"aranges"},
17      {"log the parsing of .debug_aranges"},
18      DWARF_LOG_DEBUG_ARANGES},
19     {{"comp"},
20      {"log insertions of object files into DWARF debug maps"},
21      DWARF_LOG_TYPE_COMPLETION},
22     {{"info"}, {"log the parsing of .debug_info"}, DWARF_LOG_DEBUG_INFO},
23     {{"line"}, {"log the parsing of .debug_line"}, DWARF_LOG_DEBUG_LINE},
24     {{"lookups"},
25      {"log any lookups that happen by name, regex, or address"},
26      DWARF_LOG_LOOKUPS},
27     {{"map"},
28      {"log struct/unions/class type completions"},
29      DWARF_LOG_DEBUG_MAP},
30     {{"pubnames"},
31      {"log the parsing of .debug_pubnames"},
32      DWARF_LOG_DEBUG_PUBNAMES},
33     {{"pubtypes"},
34      {"log the parsing of .debug_pubtypes"},
35      DWARF_LOG_DEBUG_PUBTYPES},
36 };
37 
38 Log::Channel LogChannelDWARF::g_channel(g_categories, DWARF_LOG_DEFAULT);
39 
40 void LogChannelDWARF::Initialize() {
41   Log::Register("dwarf", g_channel);
42 }
43 
44 void LogChannelDWARF::Terminate() { Log::Unregister("dwarf"); }
45