Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lldb/include/lldb/Utility/LLDBLog.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ enum class LLDBLog : Log::MaskType {
Watchpoints = Log::ChannelFlag<30>,
OnDemand = Log::ChannelFlag<31>,
Source = Log::ChannelFlag<32>,
Disassembler = Log::ChannelFlag<33>,
LLVM_MARK_AS_BITMASK_ENUM(OnDemand),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to update this with the last enum. Someone forgot to do it when they added the Source enum. So this line should be:

LLVM_MARK_AS_BITMASK_ENUM(Disassembler),

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch. Done.

};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@ class InstructionLLVMC : public lldb_private::Instruction {
}
}

if (Log *log = GetLog(LLDBLog::Process)) {
if (Log *log = GetLog(LLDBLog::Disassembler)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do have the option to specify multiple flag bits:

if (Log *log = GetLog(LLDBLog::Process  | LLDBLog::Disassembler)) {

We might want to add this to ensure that the logging behavior doesn't change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

StreamString ss;

ss.Printf("[%s] expands to %zu operands:\n", operands_string,
Expand Down
3 changes: 3 additions & 0 deletions lldb/source/Utility/LLDBLog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ static constexpr Log::Category g_categories[] = {
{"log symbol on-demand related activities"},
LLDBLog::OnDemand},
{{"source"}, {"log source related activities"}, LLDBLog::Source},
{{"disassembler"},
{"log disassembler related activities"},
LLDBLog::Disassembler},
};

static Log::Channel g_log_channel(g_categories,
Expand Down