Skip to content

Commit 9e90788

Browse files
authored
[LLDB][NVIDIA] Add Disassembler log channel (#148290)
This commit introduces a new log channel for the disassembler in LLDB, allowing for better logging of disassembler related activities. The `LLDBLOG` enum has been updated to include the `Disassembler` channel, and the relevant logging in the `DisassemblerLLVMC` plugin has been modified to utilize this new channel. This is in preparation for adding additional disassembler implementations. Key Changes: - Added `Disassembler` to the `LLDBLog` enum. - Updated logging in `DisassemblerLLVMC.cpp` to use the new `Disassembler` log channel.
1 parent 2807866 commit 9e90788

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

lldb/include/lldb/Utility/LLDBLog.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ enum class LLDBLog : Log::MaskType {
4949
Watchpoints = Log::ChannelFlag<30>,
5050
OnDemand = Log::ChannelFlag<31>,
5151
Source = Log::ChannelFlag<32>,
52-
LLVM_MARK_AS_BITMASK_ENUM(OnDemand),
52+
Disassembler = Log::ChannelFlag<33>,
53+
LLVM_MARK_AS_BITMASK_ENUM(Disassembler),
5354
};
5455

5556
LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE();

lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1146,7 +1146,7 @@ class InstructionLLVMC : public lldb_private::Instruction {
11461146
}
11471147
}
11481148

1149-
if (Log *log = GetLog(LLDBLog::Process)) {
1149+
if (Log *log = GetLog(LLDBLog::Process | LLDBLog::Disassembler)) {
11501150
StreamString ss;
11511151

11521152
ss.Printf("[%s] expands to %zu operands:\n", operands_string,

lldb/source/Utility/LLDBLog.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ static constexpr Log::Category g_categories[] = {
6464
{"log symbol on-demand related activities"},
6565
LLDBLog::OnDemand},
6666
{{"source"}, {"log source related activities"}, LLDBLog::Source},
67+
{{"disassembler"},
68+
{"log disassembler related activities"},
69+
LLDBLog::Disassembler},
6770
};
6871

6972
static Log::Channel g_log_channel(g_categories,

0 commit comments

Comments
 (0)