[Lldb-commits] [PATCH] D62743: Add color to the default thread and frame format.

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 3 09:03:50 PDT 2019


aprantl added a comment.

Sorry, I got more comments :-)



================
Comment at: lldb/source/Core/Debugger.cpp:124
+#define FILE_COLOR "${ansi.fg.yellow}"
+#define STOP_COLOR "${ansi.fg.red}$"
+
----------------
Thanks, but I was thinking more about something that could be replaced dynamically to support dark and light terminals in the same LLDB binary. Int hits form, this probably doesn't add much because ...


================
Comment at: lldb/source/Core/Debugger.cpp:141
   "{, ${thread.info.trace_messages} messages}"                                 \
-  "{, stop reason = ${thread.stop-reason}}"                                    \
+  "{, stop reason = " STOP_COLOR " ${thread.stop-reason} ${ansi.normal}}"      \
   "{\\nReturn value: ${thread.return-value}}"                                  \
----------------
... because we probably want a macro for the entire "stop reason" string, not just its colors ...


================
Comment at: lldb/source/Core/Debugger.cpp:151
   "{, ${thread.info.trace_messages} messages}"                                 \
-  "{, stop reason = ${thread.stop-reason}}"                                    \
+  "{, stop reason = " STOP_COLOR " ${thread.stop-reason} ${ansi.normal}}"      \
   "{\\nReturn value: ${thread.return-value}}"                                  \
----------------
... and use it here, too.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62743/new/

https://reviews.llvm.org/D62743





More information about the lldb-commits mailing list