180814287SRaphael Isemann //===-- ProcessWindowsLog.cpp ---------------------------------------------===//
218a9135dSAdrian McCarthy //
32946cd70SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
42946cd70SChandler Carruth // See https://llvm.org/LICENSE.txt for license information.
52946cd70SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
618a9135dSAdrian McCarthy //
718a9135dSAdrian McCarthy //===----------------------------------------------------------------------===//
818a9135dSAdrian McCarthy
918a9135dSAdrian McCarthy #include "ProcessWindowsLog.h"
1018a9135dSAdrian McCarthy
1118a9135dSAdrian McCarthy using namespace lldb_private;
1218a9135dSAdrian McCarthy
133cc0e33eSPavel Labath static constexpr Log::Category g_categories[] = {
14*6b67e89bSPavel Labath {{"break"}, {"log breakpoints"}, WindowsLog::Breakpoints},
15*6b67e89bSPavel Labath {{"event"}, {"log low level debugger events"}, WindowsLog::Event},
16*6b67e89bSPavel Labath {{"exception"}, {"log exception information"}, WindowsLog::Exception},
17*6b67e89bSPavel Labath {{"memory"}, {"log memory reads and writes"}, WindowsLog::Memory},
18*6b67e89bSPavel Labath {{"process"}, {"log process events and activities"}, WindowsLog::Process},
19*6b67e89bSPavel Labath {{"registers"}, {"log register read/writes"}, WindowsLog::Registers},
20*6b67e89bSPavel Labath {{"step"}, {"log step related activities"}, WindowsLog::Step},
21*6b67e89bSPavel Labath {{"thread"}, {"log thread events and activities"}, WindowsLog::Thread},
223cc0e33eSPavel Labath };
2318a9135dSAdrian McCarthy
24*6b67e89bSPavel Labath static Log::Channel g_channel(g_categories, WindowsLog::Process);
25*6b67e89bSPavel Labath
LogChannelFor()26*6b67e89bSPavel Labath template <> Log::Channel &lldb_private::LogChannelFor<WindowsLog>() {
27*6b67e89bSPavel Labath return g_channel;
28*6b67e89bSPavel Labath }
2918a9135dSAdrian McCarthy
Initialize()30b9c1b51eSKate Stone void ProcessWindowsLog::Initialize() {
313cc0e33eSPavel Labath static llvm::once_flag g_once_flag;
323cc0e33eSPavel Labath llvm::call_once(g_once_flag, []() { Log::Register("windows", g_channel); });
3318a9135dSAdrian McCarthy }
3418a9135dSAdrian McCarthy
Terminate()35b9c1b51eSKate Stone void ProcessWindowsLog::Terminate() {}
3618a9135dSAdrian McCarthy
3718a9135dSAdrian McCarthy
3818a9135dSAdrian McCarthy
3918a9135dSAdrian McCarthy
4018a9135dSAdrian McCarthy
4118a9135dSAdrian McCarthy
4218a9135dSAdrian McCarthy
4318a9135dSAdrian McCarthy
4418a9135dSAdrian McCarthy
45