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 
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"},
26  {{"dyld"},
27  {"log shared library related activities"},
29  {{"event"},
30  {"log broadcaster, listener and event queue activities"},
32  {{"expr"}, {"log expressions"}, LLDBLog::Expressions},
33  {{"formatters"},
34  {"log data formatters related activities"},
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"},
44  {{"object"},
45  {"log object construction/destruction for important objects"},
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"},
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"},
66 };
67 
75 
77  return g_log_channel;
78 }
79 
82 }
lldb_private::LLDBLog::Types
@ Types
lldb_private::LLDBLog::JITLoader
@ JITLoader
lldb_private::LLDBLog::Symbols
@ Symbols
lldb_private::LLDBLog::Language
@ Language
lldb_private::LLDBLog::AST
@ AST
lldb_private::Log::Register
static void Register(llvm::StringRef name, Channel &channel)
Definition: Log.cpp:197
lldb_private::LLDBLog::Temporary
@ Temporary
lldb_private::LLDBLog::Host
@ Host
lldb_private::LLDBLog::OnDemand
@ OnDemand
lldb_private::LLDBLog::Commands
@ Commands
lldb_private::LLDBLog::Events
@ Events
lldb_private::InitializeLldbChannel
void InitializeLldbChannel()
Definition: LLDBLog.cpp:80
lldb_private::LLDBLog::Modules
@ Modules
lldb_private::LLDBLog::MMap
@ MMap
lldb_private::LLDBLog::API
@ API
lldb_private::Log::Category
Definition: Log.h:130
lldb_private::LLDBLog::Unwind
@ Unwind
lldb_private::LLDBLog::Connection
@ Connection
Log.h
lldb_private::LLDBLog::Process
@ Process
lldb_private::LLDBLog::Thread
@ Thread
lldb_private::LLDBLog::Watchpoints
@ Watchpoints
lldb_private::LLDBLog::State
@ State
lldb_private::LLDBLog::Breakpoints
@ Breakpoints
lldb_private::LLDBLog::SystemRuntime
@ SystemRuntime
lldb_private::LLDBLog::Step
@ Step
lldb_private::Log::Channel
Definition: Log.h:146
lldb_private::LLDBLog::Communication
@ Communication
lldb_private::LLDBLog::DynamicLoader
@ DynamicLoader
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)
lldb_private::LLDBLog::Object
@ Object
lldb_private::LogChannelFor< LLDBLog >
Log::Channel & LogChannelFor< LLDBLog >()
Definition: LLDBLog.cpp:76
lldb_private::LLDBLog::Platform
@ Platform
lldb_private::LLDBLog::DataFormatters
@ DataFormatters
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::LLDBLog::Target
@ Target
lldb_private::LLDBLog::Script
@ Script
g_categories
static constexpr Log::Category g_categories[]
Definition: LLDBLog.cpp:16
lldb_private::LLDBLog::Expressions
@ Expressions
LLDBLog.h
lldb_private::LLDBLog::Demangle
@ Demangle
lldb_private::LLDBLog::OS
@ OS