JDevlieghere created this revision. JDevlieghere added reviewers: clayborg, aprantl, teemperor, labath. Herald added a project: LLDB.
Now that we correctly ignore ASCII escape sequences (r 362240) when colors are disabled, I'd like to change the the default frame and thread format to include color in their output, in line with the syntax highlighting that Raphael added a while ago. More specifically, I want to highlight the stop reason and the file + line/column number. With colors disabled, this of course is a no-op. Please see the following screenshot for example output: https://i.imgur.com/KRZhxSz.png Repository: rLLDB LLDB https://reviews.llvm.org/D62743 Files: lldb/source/Core/Debugger.cpp Index: lldb/source/Core/Debugger.cpp =================================================================== --- lldb/source/Core/Debugger.cpp +++ lldb/source/Core/Debugger.cpp @@ -121,7 +121,10 @@ "{${frame.no-debug}${function.pc-offset}}}}" #define FILE_AND_LINE \ - "{ at ${line.file.basename}:${line.number}{:${line.column}}}" + "{ at ${ansi.fg.yellow}" \ + "${line.file.basename}:${line.number}{:${line.column}" \ + "}${ansi.normal}}" + #define IS_OPTIMIZED "{${function.is-optimized} [opt]}" #define IS_ARTIFICIAL "{${frame.is-artificial} [artificial]}" @@ -133,7 +136,7 @@ "{, queue = '${thread.queue}'}" \ "{, activity = '${thread.info.activity.name}'}" \ "{, ${thread.info.trace_messages} messages}" \ - "{, stop reason = ${thread.stop-reason}}" \ + "{, stop reason = ${ansi.fg.red}${thread.stop-reason}${ansi.normal}}" \ "{\\nReturn value: ${thread.return-value}}" \ "{\\nCompleted expression: ${thread.completed-expression}}" \ "\\n" @@ -143,7 +146,7 @@ "{, queue = '${thread.queue}'}" \ "{, activity = '${thread.info.activity.name}'}" \ "{, ${thread.info.trace_messages} messages}" \ - "{, stop reason = ${thread.stop-reason}}" \ + "{, stop reason = ${ansi.fg.red}${thread.stop-reason}${ansi.normal}}" \ "{\\nReturn value: ${thread.return-value}}" \ "{\\nCompleted expression: ${thread.completed-expression}}" \ "\\n"
Index: lldb/source/Core/Debugger.cpp =================================================================== --- lldb/source/Core/Debugger.cpp +++ lldb/source/Core/Debugger.cpp @@ -121,7 +121,10 @@ "{${frame.no-debug}${function.pc-offset}}}}" #define FILE_AND_LINE \ - "{ at ${line.file.basename}:${line.number}{:${line.column}}}" + "{ at ${ansi.fg.yellow}" \ + "${line.file.basename}:${line.number}{:${line.column}" \ + "}${ansi.normal}}" + #define IS_OPTIMIZED "{${function.is-optimized} [opt]}" #define IS_ARTIFICIAL "{${frame.is-artificial} [artificial]}" @@ -133,7 +136,7 @@ "{, queue = '${thread.queue}'}" \ "{, activity = '${thread.info.activity.name}'}" \ "{, ${thread.info.trace_messages} messages}" \ - "{, stop reason = ${thread.stop-reason}}" \ + "{, stop reason = ${ansi.fg.red}${thread.stop-reason}${ansi.normal}}" \ "{\\nReturn value: ${thread.return-value}}" \ "{\\nCompleted expression: ${thread.completed-expression}}" \ "\\n" @@ -143,7 +146,7 @@ "{, queue = '${thread.queue}'}" \ "{, activity = '${thread.info.activity.name}'}" \ "{, ${thread.info.trace_messages} messages}" \ - "{, stop reason = ${thread.stop-reason}}" \ + "{, stop reason = ${ansi.fg.red}${thread.stop-reason}${ansi.normal}}" \ "{\\nReturn value: ${thread.return-value}}" \ "{\\nCompleted expression: ${thread.completed-expression}}" \ "\\n"
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits