[Lldb-commits] [lldb] [lldb][DWARF] Only log address range error to verbose channel (PR #144037)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 13 02:26:04 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Michael Buch (Michael137)
<details>
<summary>Changes</summary>
Currently `LLDB_LOG_ERROR` always logs to the "always-on" channel (which prints to the console; this started with https://github.com/llvm/llvm-project/pull/111911).
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.
---
Full diff: https://github.com/llvm/llvm-project/pull/144037.diff
1 Files Affected:
- (modified) lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp (+1-1)
``````````diff
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
index 5196ce89a2c13..4d091f4deeabe 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
@@ -617,7 +617,7 @@ void DWARFDebugInfoEntry::BuildFunctionAddressRangeTable(
for (const auto &r : *ranges)
debug_aranges->AppendRange(GetOffset(), r.LowPC, r.HighPC);
} else {
- LLDB_LOG_ERROR(log, ranges.takeError(), "DIE({1:x}): {0}", GetOffset());
+ LLDB_LOG_ERRORV(log, ranges.takeError(), "DIE({1:x}): {0}", GetOffset());
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/144037
More information about the lldb-commits
mailing list