1 //===-- ProcessKDPLog.cpp -------------------------------------------------===//
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 #include "ProcessKDPLog.h"
10
11 using namespace lldb_private;
12
13 static constexpr Log::Category g_categories[] = {
14 {{"async"}, {"log asynchronous activity"}, KDP_LOG_ASYNC},
15 {{"break"}, {"log breakpoints"}, KDP_LOG_BREAKPOINTS},
16 {{"comm"}, {"log communication activity"}, KDP_LOG_COMM},
17 {{"data-long"},
18 {"log memory bytes for memory reads and writes for all transactions"},
19 KDP_LOG_MEMORY_DATA_LONG},
20 {{"data-short"},
21 {"log memory bytes for memory reads and writes for short transactions "
22 "only"},
23 KDP_LOG_MEMORY_DATA_SHORT},
24 {{"memory"}, {"log memory reads and writes"}, KDP_LOG_MEMORY},
25 {{"packets"}, {"log gdb remote packets"}, KDP_LOG_PACKETS},
26 {{"process"}, {"log process events and activities"}, KDP_LOG_PROCESS},
27 {{"step"}, {"log step related activities"}, KDP_LOG_STEP},
28 {{"thread"}, {"log thread events and activities"}, KDP_LOG_THREAD},
29 {{"watch"}, {"log watchpoint related activities"}, KDP_LOG_WATCHPOINTS},
30 };
31
32 Log::Channel ProcessKDPLog::g_channel(g_categories, KDP_LOG_DEFAULT);
33
Initialize()34 void ProcessKDPLog::Initialize() { Log::Register("kdp-remote", g_channel); }
35