diff options
author | taalhaataahir0102 <77788288+taalhaataahir0102@users.noreply.github.com> | 2023-12-08 16:09:04 +0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-08 11:09:04 +0000 |
commit | c90cb6eee8296953c097fcc9fc6e61f739c0dad3 (patch) | |
tree | 8a710839b64e2a6d830b5fcbb025760be6650534 /llvm/lib/Support/CommandLine.cpp | |
parent | faecc736e2ac3cd8c77bebf41b1ed2e2d8cb575f (diff) | |
download | llvm-c90cb6eee8296953c097fcc9fc6e61f739c0dad3.zip llvm-c90cb6eee8296953c097fcc9fc6e61f739c0dad3.tar.gz llvm-c90cb6eee8296953c097fcc9fc6e61f739c0dad3.tar.bz2 |
[lldb] colorize symbols in image lookup with a regex pattern (#69422)
Fixes https://github.com/llvm/llvm-project/issues/57372
Previously some work has already been done on this. A PR was generated
but it remained in review:
https://reviews.llvm.org/D136462
In short previous approach was following:
Changing the symbol names (making the searched part colorized) ->
printing them -> restoring the symbol names back in their original form.
The reviewers suggested that instead of changing the symbol table, this
colorization should be done in the dump functions itself. Our strategy
involves passing the searched regex pattern to the existing dump
functions responsible for printing information about the searched
symbol. This pattern is propagated until it reaches the line in the dump
functions responsible for displaying symbol information on screen.
At this point, we've introduced a new function called
"PutCStringColorHighlighted," which takes the searched pattern, a prefix and suffix,
and the text and applies colorization to highlight the pattern in the
output. This approach aims to streamline the symbol search process to
improve readability of search results.
Co-authored-by: José L. Junior <josejunior@10xengineers.ai>
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
0 files changed, 0 insertions, 0 deletions