LLDB  mainline
ProcessWindowsLog.cpp
Go to the documentation of this file.
1 //===-- ProcessWindowsLog.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 "ProcessWindowsLog.h"
10 
11 using namespace lldb_private;
12 
13 static constexpr Log::Category g_categories[] = {
14  {{"break"}, {"log breakpoints"}, WINDOWS_LOG_BREAKPOINTS},
15  {{"event"}, {"log low level debugger events"}, WINDOWS_LOG_EVENT},
16  {{"exception"}, {"log exception information"}, WINDOWS_LOG_EXCEPTION},
17  {{"memory"}, {"log memory reads and writes"}, WINDOWS_LOG_MEMORY},
18  {{"process"}, {"log process events and activities"}, WINDOWS_LOG_PROCESS},
19  {{"registers"}, {"log register read/writes"}, WINDOWS_LOG_REGISTERS},
20  {{"step"}, {"log step related activities"}, WINDOWS_LOG_STEP},
21  {{"thread"}, {"log thread events and activities"}, WINDOWS_LOG_THREAD},
22 };
23 
25 
27  static llvm::once_flag g_once_flag;
28  llvm::call_once(g_once_flag, []() { Log::Register("windows", g_channel); });
29 }
30 
32 
33 
34 
35 
36 
37 
38 
39 
40 
WINDOWS_LOG_PROCESS
#define WINDOWS_LOG_PROCESS
Definition: ProcessWindowsLog.h:14
lldb_private::ProcessWindowsLog::Initialize
static void Initialize()
Definition: ProcessWindowsLog.cpp:26
WINDOWS_LOG_REGISTERS
#define WINDOWS_LOG_REGISTERS
Definition: ProcessWindowsLog.h:20
g_categories
static constexpr Log::Category g_categories[]
Definition: ProcessWindowsLog.cpp:13
lldb_private::Log::Register
static void Register(llvm::StringRef name, Channel &channel)
Definition: Log.cpp:189
WINDOWS_LOG_THREAD
#define WINDOWS_LOG_THREAD
Definition: ProcessWindowsLog.h:16
ProcessWindowsLog.h
lldb_private::Log::Category
Definition: Log.h:52
WINDOWS_LOG_EXCEPTION
#define WINDOWS_LOG_EXCEPTION
Definition: ProcessWindowsLog.h:15
WINDOWS_LOG_EVENT
#define WINDOWS_LOG_EVENT
Definition: ProcessWindowsLog.h:21
WINDOWS_LOG_BREAKPOINTS
#define WINDOWS_LOG_BREAKPOINTS
Definition: ProcessWindowsLog.h:18
lldb_private::Log::Channel
Definition: Log.h:60
WINDOWS_LOG_STEP
#define WINDOWS_LOG_STEP
Definition: ProcessWindowsLog.h:19
lldb_private::ProcessWindowsLog::g_channel
static Log::Channel g_channel
Definition: ProcessWindowsLog.h:25
lldb_private::ProcessWindowsLog::Terminate
static void Terminate()
Definition: ProcessWindowsLog.cpp:31
WINDOWS_LOG_MEMORY
#define WINDOWS_LOG_MEMORY
Definition: ProcessWindowsLog.h:17
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16