LLDB mainline
ProcessPOSIXLog.cpp
Go to the documentation of this file.
1//===-- ProcessPOSIXLog.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 "ProcessPOSIXLog.h"
10
11#include "llvm/Support/Threading.h"
12
13using namespace lldb_private;
14
15static constexpr Log::Category g_categories[] = {
16 {{"break"}, {"log breakpoints"}, POSIXLog::Breakpoints},
17 {{"memory"}, {"log memory reads and writes"}, POSIXLog::Memory},
18 {{"process"}, {"log process events and activities"}, POSIXLog::Process},
19 {{"ptrace"}, {"log all calls to ptrace"}, POSIXLog::Ptrace},
20 {{"registers"}, {"log register read/writes"}, POSIXLog::Registers},
21 {{"thread"}, {"log thread events and activities"}, POSIXLog::Thread},
22 {{"watch"}, {"log watchpoint related activities"}, POSIXLog::Watchpoints},
23};
24
25static Log::Channel g_channel(g_categories, POSIXLog::Process);
26
28 return g_channel;
29}
30
32 static llvm::once_flag g_once_flag;
33 llvm::call_once(g_once_flag, []() { Log::Register("posix", g_channel); });
34}
static Log::Channel g_channel(g_categories, GDBRLog::Packets)
static constexpr Log::Category g_categories[]
static Log::Channel g_channel(g_categories, POSIXLog::Process)
static void Register(llvm::StringRef name, Channel &channel)
Definition: Log.cpp:211
A class that represents a running process on the host machine.
Log::Channel & LogChannelFor< POSIXLog >()