]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp
Update to bmake-201802222
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / source / Plugins / SymbolFile / DWARF / LogChannelDWARF.cpp
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_private;
13
14 static constexpr Log::Category g_categories[] = {
15     {{"aranges"},
16      {"log the parsing of .debug_aranges"},
17      DWARF_LOG_DEBUG_ARANGES},
18     {{"comp"},
19      {"log insertions of object files into DWARF debug maps"},
20      DWARF_LOG_TYPE_COMPLETION},
21     {{"info"}, {"log the parsing of .debug_info"}, DWARF_LOG_DEBUG_INFO},
22     {{"line"}, {"log the parsing of .debug_line"}, DWARF_LOG_DEBUG_LINE},
23     {{"lookups"},
24      {"log any lookups that happen by name, regex, or address"},
25      DWARF_LOG_LOOKUPS},
26     {{"map"},
27      {"log struct/unions/class type completions"},
28      DWARF_LOG_DEBUG_MAP},
29     {{"pubnames"},
30      {"log the parsing of .debug_pubnames"},
31      DWARF_LOG_DEBUG_PUBNAMES},
32     {{"pubtypes"},
33      {"log the parsing of .debug_pubtypes"},
34      DWARF_LOG_DEBUG_PUBTYPES},
35 };
36
37 Log::Channel LogChannelDWARF::g_channel(g_categories, DWARF_LOG_DEFAULT);
38
39 void LogChannelDWARF::Initialize() {
40   Log::Register("dwarf", g_channel);
41 }
42
43 void LogChannelDWARF::Terminate() { Log::Unregister("dwarf"); }