LLDB mainline
LLDBLog.cpp
Go to the documentation of this file.
1//===-- LLDBLog.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
10#include "lldb/Utility/Log.h"
11#include "llvm/ADT/ArrayRef.h"
12#include <cstdarg>
13
14using namespace lldb_private;
15
16static constexpr Log::Category g_categories[] = {
17 {{"api"}, {"log API calls and return values"}, LLDBLog::API},
18 {{"ast"}, {"log AST"}, LLDBLog::AST},
19 {{"break"}, {"log breakpoints"}, LLDBLog::Breakpoints},
20 {{"commands"}, {"log command argument parsing"}, LLDBLog::Commands},
21 {{"comm"}, {"log communication activities"}, LLDBLog::Communication},
22 {{"conn"}, {"log connection details"}, LLDBLog::Connection},
23 {{"demangle"},
24 {"log mangled names to catch demangler crashes"},
25 LLDBLog::Demangle},
26 {{"dyld"},
27 {"log shared library related activities"},
28 LLDBLog::DynamicLoader},
29 {{"event"},
30 {"log broadcaster, listener and event queue activities"},
31 LLDBLog::Events},
32 {{"expr"}, {"log expressions"}, LLDBLog::Expressions},
33 {{"formatters"},
34 {"log data formatters related activities"},
35 LLDBLog::DataFormatters},
36 {{"host"}, {"log host activities"}, LLDBLog::Host},
37 {{"jit"}, {"log JIT events in the target"}, LLDBLog::JITLoader},
38 {{"language"}, {"log language runtime events"}, LLDBLog::Language},
39 {{"mmap"}, {"log mmap related activities"}, LLDBLog::MMap},
40 {{"module"},
41 {"log module activities such as when modules are created, destroyed, "
42 "replaced, and more"},
43 LLDBLog::Modules},
44 {{"object"},
45 {"log object construction/destruction for important objects"},
46 LLDBLog::Object},
47 {{"os"}, {"log OperatingSystem plugin related activities"}, LLDBLog::OS},
48 {{"platform"}, {"log platform events and activities"}, LLDBLog::Platform},
49 {{"process"}, {"log process events and activities"}, LLDBLog::Process},
50 {{"script"}, {"log events about the script interpreter"}, LLDBLog::Script},
51 {{"state"},
52 {"log private and public process state changes"},
53 LLDBLog::State},
54 {{"step"}, {"log step related activities"}, LLDBLog::Step},
55 {{"symbol"}, {"log symbol related issues and warnings"}, LLDBLog::Symbols},
56 {{"system-runtime"}, {"log system runtime events"}, LLDBLog::SystemRuntime},
57 {{"target"}, {"log target events and activities"}, LLDBLog::Target},
58 {{"temp"}, {"log internal temporary debug messages"}, LLDBLog::Temporary},
59 {{"thread"}, {"log thread events and activities"}, LLDBLog::Thread},
60 {{"types"}, {"log type system related activities"}, LLDBLog::Types},
61 {{"unwind"}, {"log stack unwind activities"}, LLDBLog::Unwind},
62 {{"watch"}, {"log watchpoint related activities"}, LLDBLog::Watchpoints},
63 {{"on-demand"},
64 {"log symbol on-demand related activities"},
65 LLDBLog::OnDemand},
66};
67
69 LLDBLog::Process | LLDBLog::Thread |
70 LLDBLog::DynamicLoader |
71 LLDBLog::Breakpoints |
72 LLDBLog::Watchpoints | LLDBLog::Step |
73 LLDBLog::State | LLDBLog::Symbols |
74 LLDBLog::Target | LLDBLog::Commands);
75
77 return g_log_channel;
78}
79
82}
static Log::Channel g_log_channel(g_categories, LLDBLog::Process|LLDBLog::Thread|LLDBLog::DynamicLoader|LLDBLog::Breakpoints|LLDBLog::Watchpoints|LLDBLog::Step|LLDBLog::State|LLDBLog::Symbols|LLDBLog::Target|LLDBLog::Commands)
static constexpr Log::Category g_categories[]
Definition: LLDBLog.cpp:16
static void Register(llvm::StringRef name, Channel &channel)
Definition: Log.cpp:198
A class that represents a running process on the host machine.
Log::Channel & LogChannelFor< LLDBLog >()
Definition: LLDBLog.cpp:76
void InitializeLldbChannel()
Definition: LLDBLog.cpp:80