Skip to content

Commit 3a815c2

Browse files
committed
[lldb][DWARF] Only log address range error to verbose channel
Currently `LLDB_LOG_ERROR` always logs to the "always-on" channel (which prints to the console; this started with TBD). Attaching to LLDB spams the console with a bunch of these messages: ``` ... 2025-06-13 10:15:09.965660+0100 lldb[40872:3936672] [lldb] DIE(0x240901): DIE has no address range information 2025-06-13 10:15:09.965667+0100 lldb[40872:3936672] [lldb] DIE(0x240925): DIE has no address range information 2025-06-13 10:15:09.965672+0100 lldb[40872:3936672] [lldb] DIE(0x240942): DIE has no address range information 2025-06-13 10:15:09.965679+0100 lldb[40872:3936672] [lldb] DIE(0x24095e): DIE has no address range information 2025-06-13 10:15:09.965686+0100 lldb[40872:3936672] [lldb] DIE(0x240981): DIE has no address range information 2025-06-13 10:15:09.965694+0100 lldb[40872:3936672] [lldb] DIE(0x240993): DIE has no address range information 2025-06-13 10:15:09.965701+0100 lldb[40872:3936672] [lldb] DIE(0x2409a2): DIE has no address range information ... ``` AFAIU this is not a fatal error, so this patch downgrades it from "always-on" by logging only in "verbose" mode. It still seems pretty aggressive to log all `LLDB_LOG_ERROR` messages to the console, but this is a stop-gap until we want to do something about it.
1 parent 06c7835 commit 3a815c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ void DWARFDebugInfoEntry::BuildFunctionAddressRangeTable(
617617
for (const auto &r : *ranges)
618618
debug_aranges->AppendRange(GetOffset(), r.LowPC, r.HighPC);
619619
} else {
620-
LLDB_LOG_ERROR(log, ranges.takeError(), "DIE({1:x}): {0}", GetOffset());
620+
LLDB_LOG_ERRORV(log, ranges.takeError(), "DIE({1:x}): {0}", GetOffset());
621621
}
622622
}
623623

0 commit comments

Comments
 (0)