[Lldb-commits] [lldb] [lldb] colorize symbols in image lookup with a regex pattern (PR #69422)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Thu Dec 7 09:14:18 PST 2023
=?utf-8?q?José?= L. Junior <josejunior at 10xengineers.ai>,taalhaataahir0102
<23100293 at lums.edu.pk>,taalhaataahir0102 <23100293 at lums.edu.pk>,taalhaataahir0102
<23100293 at lums.edu.pk>,taalhaataahir0102 <23100293 at lums.edu.pk>,
=?utf-8?q?José?= L. Junior <josejunior at 10xengineers.ai>,
=?utf-8?q?José?= L. Junior <josejunior at 10xengineers.ai>,
=?utf-8?q?José?= L. Junior <josejunior at 10xengineers.ai>,
=?utf-8?q?José?= L. Junior <josejunior at 10xengineers.ai>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/69422 at github.com>
================
@@ -1618,12 +1621,19 @@ static uint32_t LookupSymbolInModule(CommandInterpreter &interpreter,
if (symbol->ValueIsAddress()) {
DumpAddress(
interpreter.GetExecutionContext().GetBestExecutionContextScope(),
- symbol->GetAddressRef(), verbose, all_ranges, strm);
+ symbol->GetAddressRef(), verbose, all_ranges, strm,
+ use_color && name_is_regex ? name : nullptr);
strm.EOL();
} else {
strm.IndentMore();
strm.Indent(" Name: ");
- strm.PutCString(symbol->GetDisplayName().GetStringRef());
+ llvm::StringRef ansi_prefix =
+ interpreter.GetDebugger().GetRegexMatchAnsiPrefix();
+ llvm::StringRef ansi_suffix =
+ interpreter.GetDebugger().GetRegexMatchAnsiSuffix();
----------------
JDevlieghere wrote:
I was about to suggest that too, but the `Stream` class lives in utility so you can't pass in the debugger or the target without breaking the layering.
https://github.com/llvm/llvm-project/pull/69422
More information about the lldb-commits
mailing list