Path: blob/main/contrib/llvm-project/lldb/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp
39644 views
//===-- ProcessPOSIXLog.cpp -----------------------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#include "ProcessPOSIXLog.h"910#include "llvm/Support/Threading.h"1112using namespace lldb_private;1314static constexpr Log::Category g_categories[] = {15{{"break"}, {"log breakpoints"}, POSIXLog::Breakpoints},16{{"memory"}, {"log memory reads and writes"}, POSIXLog::Memory},17{{"process"}, {"log process events and activities"}, POSIXLog::Process},18{{"ptrace"}, {"log all calls to ptrace"}, POSIXLog::Ptrace},19{{"registers"}, {"log register read/writes"}, POSIXLog::Registers},20{{"thread"}, {"log thread events and activities"}, POSIXLog::Thread},21{{"watch"}, {"log watchpoint related activities"}, POSIXLog::Watchpoints},22};2324static Log::Channel g_channel(g_categories, POSIXLog::Process);2526template <> Log::Channel &lldb_private::LogChannelFor<POSIXLog>() {27return g_channel;28}2930void ProcessPOSIXLog::Initialize() {31static llvm::once_flag g_once_flag;32llvm::call_once(g_once_flag, []() { Log::Register("posix", g_channel); });33}343536