LLDB
mainline
llvm-project
lldb
source
Utility
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
9
#include "
lldb/Utility/LLDBLog.h
"
10
#include "
lldb/Utility/Log.h
"
11
#include "llvm/ADT/ArrayRef.h"
12
#include <cstdarg>
13
14
using namespace
lldb_private
;
15
16
static
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
{{
"source"
}, {
"log source related activities"
},
LLDBLog::Source
},
67
{{
"disassembler"
},
68
{
"log disassembler related activities"
},
69
LLDBLog::Disassembler
},
70
};
71
72
static
Log::Channel
g_log_channel
(
g_categories
,
73
LLDBLog::Process
|
LLDBLog::Thread
|
74
LLDBLog::DynamicLoader
|
75
LLDBLog::Breakpoints
|
76
LLDBLog::Watchpoints
|
LLDBLog::Step
|
77
LLDBLog::State
|
LLDBLog::Symbols
|
78
LLDBLog::Target
|
LLDBLog::Commands
);
79
80
template
<>
Log::Channel
&
lldb_private::LogChannelFor<LLDBLog>
() {
81
return
g_log_channel
;
82
}
83
84
void
lldb_private::InitializeLldbChannel
() {
85
Log::Register
(
"lldb"
,
g_log_channel
);
86
}
g_log_channel
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)
LLDBLog.h
Log.h
lldb_private::Log::Channel
Definition
Log.h:163
lldb_private::Log::Register
static void Register(llvm::StringRef name, Channel &channel)
Definition
Log.cpp:221
g_categories
static constexpr Log::Category g_categories[]
Definition
common/Host.cpp:94
lldb_private
A class that represents a running process on the host machine.
Definition
SBAddressRange.h:14
lldb_private::LLDBLog::Communication
@ Communication
Definition
LLDBLog.h:23
lldb_private::LLDBLog::Temporary
@ Temporary
Definition
LLDBLog.h:45
lldb_private::LLDBLog::OS
@ OS
Definition
LLDBLog.h:36
lldb_private::LLDBLog::Demangle
@ Demangle
Definition
LLDBLog.h:26
lldb_private::LLDBLog::Platform
@ Platform
Definition
LLDBLog.h:37
lldb_private::LLDBLog::State
@ State
Definition
LLDBLog.h:40
lldb_private::LLDBLog::OnDemand
@ OnDemand
Definition
LLDBLog.h:50
lldb_private::LLDBLog::Step
@ Step
Definition
LLDBLog.h:41
lldb_private::LLDBLog::Object
@ Object
Definition
LLDBLog.h:35
lldb_private::LLDBLog::Language
@ Language
Definition
LLDBLog.h:32
lldb_private::LLDBLog::Unwind
@ Unwind
Definition
LLDBLog.h:48
lldb_private::LLDBLog::Symbols
@ Symbols
Definition
LLDBLog.h:42
lldb_private::LLDBLog::JITLoader
@ JITLoader
Definition
LLDBLog.h:31
lldb_private::LLDBLog::MMap
@ MMap
Definition
LLDBLog.h:33
lldb_private::LLDBLog::Events
@ Events
Definition
LLDBLog.h:28
lldb_private::LLDBLog::Disassembler
@ Disassembler
Definition
LLDBLog.h:52
lldb_private::LLDBLog::Process
@ Process
Definition
LLDBLog.h:38
lldb_private::LLDBLog::SystemRuntime
@ SystemRuntime
Definition
LLDBLog.h:43
lldb_private::LLDBLog::DataFormatters
@ DataFormatters
Definition
LLDBLog.h:25
lldb_private::LLDBLog::DynamicLoader
@ DynamicLoader
Definition
LLDBLog.h:27
lldb_private::LLDBLog::Modules
@ Modules
Definition
LLDBLog.h:34
lldb_private::LLDBLog::Host
@ Host
Definition
LLDBLog.h:30
lldb_private::LLDBLog::Connection
@ Connection
Definition
LLDBLog.h:24
lldb_private::LLDBLog::Target
@ Target
Definition
LLDBLog.h:44
lldb_private::LLDBLog::Commands
@ Commands
Definition
LLDBLog.h:22
lldb_private::LLDBLog::AST
@ AST
Definition
LLDBLog.h:20
lldb_private::LLDBLog::Breakpoints
@ Breakpoints
Definition
LLDBLog.h:21
lldb_private::LLDBLog::Expressions
@ Expressions
Definition
LLDBLog.h:29
lldb_private::LLDBLog::Thread
@ Thread
Definition
LLDBLog.h:46
lldb_private::LLDBLog::API
@ API
Definition
LLDBLog.h:19
lldb_private::LLDBLog::Watchpoints
@ Watchpoints
Definition
LLDBLog.h:49
lldb_private::LLDBLog::Types
@ Types
Definition
LLDBLog.h:47
lldb_private::LLDBLog::Source
@ Source
Definition
LLDBLog.h:51
lldb_private::LLDBLog::Script
@ Script
Definition
LLDBLog.h:39
lldb_private::LogChannelFor< LLDBLog >
Log::Channel & LogChannelFor< LLDBLog >()
Definition
LLDBLog.cpp:80
lldb_private::InitializeLldbChannel
void InitializeLldbChannel()
Definition
LLDBLog.cpp:84
lldb_private::Log::Category
Definition
Log.h:147
Generated on
for LLDB by
1.14.0