1dda28197Spatrick //===-- LogChannelDWARF.cpp -----------------------------------------------===//
2061da546Spatrick //
3061da546Spatrick // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4061da546Spatrick // See https://llvm.org/LICENSE.txt for license information.
5061da546Spatrick // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6061da546Spatrick //
7061da546Spatrick //===----------------------------------------------------------------------===//
8061da546Spatrick
9061da546Spatrick #include "LogChannelDWARF.h"
10061da546Spatrick
11061da546Spatrick using namespace lldb_private;
12061da546Spatrick
13061da546Spatrick static constexpr Log::Category g_categories[] = {
14061da546Spatrick {{"comp"},
15*f6aab3d8Srobert {"log struct/union/class type completions"},
16*f6aab3d8Srobert DWARFLog::TypeCompletion},
17*f6aab3d8Srobert {{"info"}, {"log the parsing of .debug_info"}, DWARFLog::DebugInfo},
18*f6aab3d8Srobert {{"line"}, {"log the parsing of .debug_line"}, DWARFLog::DebugLine},
19061da546Spatrick {{"lookups"},
20061da546Spatrick {"log any lookups that happen by name, regex, or address"},
21*f6aab3d8Srobert DWARFLog::Lookups},
22061da546Spatrick {{"map"},
23*f6aab3d8Srobert {"log insertions of object files into DWARF debug maps"},
24*f6aab3d8Srobert DWARFLog::DebugMap},
25061da546Spatrick };
26061da546Spatrick
27*f6aab3d8Srobert static Log::Channel g_channel(g_categories, DWARFLog::DebugInfo);
28*f6aab3d8Srobert
LogChannelFor()29*f6aab3d8Srobert template <> Log::Channel &lldb_private::LogChannelFor<DWARFLog>() {
30*f6aab3d8Srobert return g_channel;
31*f6aab3d8Srobert }
32061da546Spatrick
Initialize()33061da546Spatrick void LogChannelDWARF::Initialize() {
34061da546Spatrick Log::Register("dwarf", g_channel);
35061da546Spatrick }
36061da546Spatrick
Terminate()37061da546Spatrick void LogChannelDWARF::Terminate() { Log::Unregister("dwarf"); }
38