[libcxxabi] [lldb] [llvm] [lldb] Add frame-format option to highlight function names in backtraces (PR #131836)
Michael Buch via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 10 03:02:14 PDT 2025
================
@@ -2074,6 +2076,64 @@ static const Definition *FindEntry(const llvm::StringRef &format_str,
return parent;
}
+/// Parses a single highlighting format specifier.
+///
+/// Example syntax for such specifier:
+/// \code
+/// ${function.name-with-args:%highlight_basename(ansi.fg.green)}
----------------
Michael137 wrote:
> Keep the variable as function.name, but then add another (per-language) setting defining how exactly to format a "function name" for the given language?
I like this idea. So we'd have something like `${function.name}` in the `frame-format` setting that would default to `${function.name-with-args}` as before but could be "overriden" using a new setting like `frame-format-cxx` (per language) which could be `${function.basename}${function.arguments}` (etc.) and handled by the individual language plugins?
> Open question: whether that setting should apply only to backtraces or if should/could be used in other contexts as well.
Good question. TBH even the frame status/thread status can become pretty noisy with long demangled names. So I'd see myself wanting the format to apply to both. But I don't have a strong opinion on that
https://github.com/llvm/llvm-project/pull/131836
More information about the llvm-commits
mailing list