[Lldb-commits] [lldb] [lldb] refactor highlighting function for image lookup command (PR #76112)
José Lira Junior via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 19 06:32:47 PST 2024
================
@@ -1618,22 +1621,25 @@ static uint32_t LookupSymbolInModule(CommandInterpreter &interpreter,
for (uint32_t i = 0; i < num_matches; ++i) {
Symbol *symbol = symtab->SymbolAtIndex(match_indexes[i]);
if (symbol) {
+ Stream::HighlightSettings pattern_info(
+ name, interpreter.GetDebugger().GetRegexMatchAnsiPrefix(),
+ interpreter.GetDebugger().GetRegexMatchAnsiSuffix());
if (symbol->ValueIsAddress()) {
DumpAddress(
interpreter.GetExecutionContext().GetBestExecutionContextScope(),
symbol->GetAddressRef(), verbose, all_ranges, strm,
- use_color && name_is_regex ? name : nullptr);
+ use_color && name_is_regex
+ ? std::optional<Stream::HighlightSettings>{pattern_info}
+ : std::nullopt);
----------------
junior-jl wrote:
Done! ✅
https://github.com/llvm/llvm-project/pull/76112
More information about the lldb-commits
mailing list