LLDB
mainline
llvm-project
lldb
source
Plugins
Process
gdb-remote
ProcessGDBRemoteLog.cpp
Go to the documentation of this file.
1
//===-- ProcessGDBRemoteLog.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 "
ProcessGDBRemoteLog.h
"
10
#include "
ProcessGDBRemote.h
"
11
#include "llvm/Support/Threading.h"
12
13
using namespace
lldb
;
14
using namespace
lldb_private
;
15
using namespace
lldb_private::process_gdb_remote
;
16
17
static
constexpr
Log::Category
g_categories
[] = {
18
{{
"async"
}, {
"log asynchronous activity"
},
GDBRLog::Async
},
19
{{
"break"
}, {
"log breakpoints"
},
GDBRLog::Breakpoints
},
20
{{
"comm"
}, {
"log communication activity"
},
GDBRLog::Comm
},
21
{{
"packets"
}, {
"log gdb remote packets"
},
GDBRLog::Packets
},
22
{{
"memory"
}, {
"log memory reads and writes"
},
GDBRLog::Memory
},
23
{{
"data-short"
},
24
{
"log memory bytes for memory reads and writes for short transactions "
25
"only"
},
26
GDBRLog::MemoryDataShort
},
27
{{
"data-long"
},
28
{
"log memory bytes for memory reads and writes for all transactions"
},
29
GDBRLog::MemoryDataLong
},
30
{{
"process"
}, {
"log process events and activities"
},
GDBRLog::Process
},
31
{{
"step"
}, {
"log step related activities"
},
GDBRLog::Step
},
32
{{
"thread"
}, {
"log thread events and activities"
},
GDBRLog::Thread
},
33
{{
"watch"
}, {
"log watchpoint related activities"
},
GDBRLog::Watchpoints
},
34
};
35
36
static
Log::Channel
g_channel
(
g_categories
,
GDBRLog::Packets
);
37
38
template
<>
Log::Channel
&
lldb_private::LogChannelFor<GDBRLog>
() {
39
return
g_channel
;
40
}
41
42
void
ProcessGDBRemoteLog::Initialize
() {
43
static
llvm::once_flag g_once_flag;
44
llvm::call_once(g_once_flag, []() {
45
Log::Register
(
"gdb-remote"
,
g_channel
);
46
});
47
}
g_channel
static Log::Channel g_channel(g_categories, GDBRLog::Packets)
ProcessGDBRemoteLog.h
ProcessGDBRemote.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
lldb_private::process_gdb_remote::ProcessGDBRemoteLog::Initialize
static void Initialize()
Definition
ProcessGDBRemoteLog.cpp:42
g_categories
static constexpr Log::Category g_categories[]
Definition
common/Host.cpp:94
lldb_private::process_gdb_remote
Definition
GDBRemoteClientBase.h:22
lldb_private::process_gdb_remote::GDBRLog::Async
@ Async
Definition
ProcessGDBRemoteLog.h:19
lldb_private::process_gdb_remote::GDBRLog::Memory
@ Memory
Definition
ProcessGDBRemoteLog.h:22
lldb_private::process_gdb_remote::GDBRLog::Step
@ Step
Definition
ProcessGDBRemoteLog.h:27
lldb_private::process_gdb_remote::GDBRLog::MemoryDataLong
@ MemoryDataLong
Definition
ProcessGDBRemoteLog.h:23
lldb_private::process_gdb_remote::GDBRLog::Packets
@ Packets
Definition
ProcessGDBRemoteLog.h:25
lldb_private::process_gdb_remote::GDBRLog::Process
@ Process
Definition
ProcessGDBRemoteLog.h:26
lldb_private::process_gdb_remote::GDBRLog::Comm
@ Comm
Definition
ProcessGDBRemoteLog.h:21
lldb_private::process_gdb_remote::GDBRLog::MemoryDataShort
@ MemoryDataShort
Definition
ProcessGDBRemoteLog.h:24
lldb_private::process_gdb_remote::GDBRLog::Breakpoints
@ Breakpoints
Definition
ProcessGDBRemoteLog.h:20
lldb_private::process_gdb_remote::GDBRLog::Thread
@ Thread
Definition
ProcessGDBRemoteLog.h:28
lldb_private::process_gdb_remote::GDBRLog::Watchpoints
@ Watchpoints
Definition
ProcessGDBRemoteLog.h:29
lldb_private
A class that represents a running process on the host machine.
Definition
SBAddressRange.h:14
lldb_private::LogChannelFor
Log::Channel & LogChannelFor()=delete
lldb
Definition
SBAddress.h:15
lldb_private::Log::Category
Definition
Log.h:147
Generated on
for LLDB by
1.14.0