<div dir="ltr"><br><div><div>Index: include/lldb/Core/Debugger.h</div><div>===================================================================</div><div>--- include/lldb/Core/Debugger.h<span class="" style="white-space:pre"> </span>(revision 182486)</div>
<div>+++ include/lldb/Core/Debugger.h<span class="" style="white-space:pre"> </span>(working copy)</div><div>@@ -308,6 +308,12 @@</div><div> bool</div><div> SetUseExternalEditor (bool use_external_editor_p);</div>
<div> </div><div>+ bool</div><div>+ GetUseColor () const;</div><div>+ </div><div>+ bool</div><div>+ SetUseColor (bool use_color);</div><div>+ </div><div> uint32_t</div><div> GetStopSourceLineCount (bool before) const;</div>
<div> </div><div>Index: include/lldb/Utility/AnsiTerminal.h</div><div>===================================================================</div><div>--- include/lldb/Utility/AnsiTerminal.h<span class="" style="white-space:pre"> </span>(revision 182486)</div>
<div>+++ include/lldb/Utility/AnsiTerminal.h<span class="" style="white-space:pre"> </span>(working copy)</div><div>@@ -21,7 +21,7 @@</div><div> #define ANSI_BG_COLOR_BLACK 40</div><div> #define ANSI_BG_COLOR_RED 41<span class="" style="white-space:pre"> </span></div>
<div> #define ANSI_BG_COLOR_GREEN 42<span class="" style="white-space:pre"> </span></div><div>-#define ANSI_BG_COLOR_YELLOW 44<span class="" style="white-space:pre"> </span></div><div>+#define ANSI_BG_COLOR_YELLOW 43<span class="" style="white-space:pre"> </span></div>
<div> #define ANSI_BG_COLOR_BLUE 44<span class="" style="white-space:pre"> </span></div><div> #define ANSI_BG_COLOR_PURPLE 45<span class="" style="white-space:pre"> </span></div><div> #define ANSI_BG_COLOR_CYAN 46<span class="" style="white-space:pre"> </span></div>
<div>@@ -82,5 +82,75 @@</div><div> const char *k_ctrl_conceal<span class="" style="white-space:pre"> </span> = "8";</div><div> const char *k_ctrl_crossed_out<span class="" style="white-space:pre"> </span> = "9";</div>
<div> </div><div>+ inline std::string</div><div>+ FormatAnsiTerminalCodes(const char *format, bool do_color = true)</div><div>+ {</div><div>+ // Convert "${ansi.XXX}" tokens to ansi values or clear them if do_color is false.</div>
<div>+ static const struct</div><div>+ {</div><div>+ const char *name;</div><div>+ const char *value;</div><div>+ } g_color_tokens[] =</div><div>+ {</div>
<div>+ #define _TO_STR2(_val) #_val</div><div>+ #define _TO_STR(_val) _TO_STR2(_val)</div><div>+ { "fg.black}", ANSI_ESC_START _TO_STR(ANSI_FG_COLOR_BLACK) ANSI_ESC_END },</div>
<div>+ { "fg.red}", ANSI_ESC_START _TO_STR(ANSI_FG_COLOR_RED) ANSI_ESC_END },</div><div>+ { "fg.green}", ANSI_ESC_START _TO_STR(ANSI_FG_COLOR_GREEN) ANSI_ESC_END },</div>
<div>+ { "fg.yellow}", ANSI_ESC_START _TO_STR(ANSI_FG_COLOR_YELLOW) ANSI_ESC_END },</div><div>+ { "fg.blue}", ANSI_ESC_START _TO_STR(ANSI_FG_COLOR_BLUE) ANSI_ESC_END },</div>
<div>+ { "fg.purple}", ANSI_ESC_START _TO_STR(ANSI_FG_COLOR_PURPLE) ANSI_ESC_END },</div><div>+ { "fg.cyan}", ANSI_ESC_START _TO_STR(ANSI_FG_COLOR_CYAN) ANSI_ESC_END },</div>
<div>+ { "fg.white}", ANSI_ESC_START _TO_STR(ANSI_FG_COLOR_WHITE) ANSI_ESC_END },</div><div>+ { "bg.black}", ANSI_ESC_START _TO_STR(ANSI_BG_COLOR_BLACK) ANSI_ESC_END },</div>
<div>+ { "bg.red}", ANSI_ESC_START _TO_STR(ANSI_BG_COLOR_RED) ANSI_ESC_END },</div><div>+ { "bg.green}", ANSI_ESC_START _TO_STR(ANSI_BG_COLOR_GREEN) ANSI_ESC_END },</div>
<div>+ { "bg.yellow}", ANSI_ESC_START _TO_STR(ANSI_BG_COLOR_YELLOW) ANSI_ESC_END },</div><div>+ { "bg.blue}", ANSI_ESC_START _TO_STR(ANSI_BG_COLOR_BLUE) ANSI_ESC_END },</div>
<div>+ { "bg.purple}", ANSI_ESC_START _TO_STR(ANSI_BG_COLOR_PURPLE) ANSI_ESC_END },</div><div>+ { "bg.cyan}", ANSI_ESC_START _TO_STR(ANSI_BG_COLOR_CYAN) ANSI_ESC_END },</div>
<div>+ { "bg.white}", ANSI_ESC_START _TO_STR(ANSI_BG_COLOR_WHITE) ANSI_ESC_END },</div><div>+ { "normal}", ANSI_ESC_START _TO_STR(ANSI_CTRL_NORMAL) ANSI_ESC_END },</div>
<div>+ { "bold}", ANSI_ESC_START _TO_STR(ANSI_CTRL_BOLD) ANSI_ESC_END },</div><div>+ { "faint}", ANSI_ESC_START _TO_STR(ANSI_CTRL_FAINT) ANSI_ESC_END },</div>
<div>+ { "italic}", ANSI_ESC_START _TO_STR(ANSI_CTRL_ITALIC) ANSI_ESC_END },</div><div>+ { "underline}", ANSI_ESC_START _TO_STR(ANSI_CTRL_UNDERLINE) ANSI_ESC_END },</div>
<div>+ { "slow-blink}", ANSI_ESC_START _TO_STR(ANSI_CTRL_SLOW_BLINK) ANSI_ESC_END },</div><div>+ { "fast-blink}", ANSI_ESC_START _TO_STR(ANSI_CTRL_FAST_BLINK) ANSI_ESC_END },</div>
<div>+ { "negative}", ANSI_ESC_START _TO_STR(ANSI_CTRL_IMAGE_NEGATIVE) ANSI_ESC_END },</div><div>+ { "conceal}", ANSI_ESC_START _TO_STR(ANSI_CTRL_CONCEAL) ANSI_ESC_END },</div>
<div>+ { "crossed-out}", ANSI_ESC_START _TO_STR(ANSI_CTRL_CROSSED_OUT) ANSI_ESC_END },</div><div>+ #undef _TO_STR</div><div>+ #undef _TO_STR2</div><div>+ };</div><div>
+ static const char tok_hdr[] = "${ansi.";</div><div>+</div><div>+ std::string fmt;</div><div>+ for (const char *p = format; *p; ++p)</div><div>+ {</div><div>+ const char *tok_start = strstr (p, tok_hdr);</div>
<div>+ if (!tok_start)</div><div>+ {</div><div>+ fmt.append (p);</div><div>+ break;</div><div>+ }</div><div>+</div><div>+ fmt.append (p, tok_start - p);</div>
<div>+ p = tok_start;</div><div>+</div><div>+ const char *tok_str = tok_start + sizeof(tok_hdr) - 1;</div><div>+ for (size_t i = 0; i < sizeof(g_color_tokens) / sizeof(g_color_tokens[0]); ++i)</div>
<div>+ {</div><div>+ if (!strncmp (tok_str, g_color_tokens[i].name, strlen(g_color_tokens[i].name)))</div><div>+ {</div><div>+ if (do_color)</div>
<div>+ fmt.append (g_color_tokens[i].value);</div><div>+ p = tok_str + strlen (g_color_tokens[i].name) - 1;</div><div>+ break;</div><div>+ }</div>
<div>+ }</div><div>+ }</div><div>+ return fmt;</div><div>+ }</div><div> }</div><div> }</div><div>Index: source/Core/Debugger.cpp</div><div>===================================================================</div>
<div>--- source/Core/Debugger.cpp<span class="" style="white-space:pre"> </span>(revision 182486)</div><div>+++ source/Core/Debugger.cpp<span class="" style="white-space:pre"> </span>(working copy)</div><div>@@ -131,6 +131,7 @@</div>
<div> { "term-width", OptionValue::eTypeSInt64 , true, 80 , NULL, NULL, "The maximum number of columns to use for displaying text." },</div><div> { "thread-format", OptionValue::eTypeString , true, 0 , DEFAULT_THREAD_FORMAT, NULL, "The default thread format string to use when displaying thread information." },</div>
<div> { "use-external-editor", OptionValue::eTypeBoolean, true, false, NULL, NULL, "Whether to use an external editor or not." },</div><div>+{ "use-color", OptionValue::eTypeBoolean, true, true , NULL, NULL, "Whether to use Ansi color codes or not." },</div>
<div> </div><div> { NULL, OptionValue::eTypeInvalid, true, 0 , NULL, NULL, NULL }</div><div> };</div><div>@@ -148,7 +149,8 @@</div><div> ePropertyStopLineCountBefore,</div><div> ePropertyTerminalWidth,</div>
<div> ePropertyThreadFormat,</div><div>- ePropertyUseExternalEditor</div><div>+ ePropertyUseExternalEditor,</div><div>+ ePropertyUseColor,</div><div> };</div><div> </div><div> //</div><div>@@ -186,9 +188,17 @@</div>
<div> if (strcmp(property_path, g_properties[ePropertyPrompt].name) == 0)</div><div> {</div><div> const char *new_prompt = GetPrompt();</div><div>+ std::string str = lldb_utility::ansi::FormatAnsiTerminalCodes (new_prompt, GetUseColor());</div>
<div>+ if (str.length())</div><div>+ new_prompt = str.c_str();</div><div> EventSP prompt_change_event_sp (new Event(CommandInterpreter::eBroadcastBitResetPrompt, new EventDataBytes (new_prompt)));</div>
<div> GetCommandInterpreter().BroadcastEvent (prompt_change_event_sp);</div><div> }</div><div>+ else if (strcmp(property_path, g_properties[ePropertyUseColor].name) == 0)</div><div>+ {</div>
<div>+<span class="" style="white-space:pre"> </span>// use-color changed. Ping the prompt so it can reset the ansi terminal codes.</div><div>+ SetPrompt (GetPrompt());</div><div>+ }</div><div> else if (is_load_script && target_sp && load_script_old_value == eLoadScriptFromSymFileWarn)</div>
<div> {</div><div> if (target_sp->TargetProperties::GetLoadScriptFromSymbolFile() == eLoadScriptFromSymFileTrue)</div><div>@@ -244,6 +254,9 @@</div><div> const uint32_t idx = ePropertyPrompt;</div>
<div> m_collection_sp->SetPropertyAtIndexAsString (NULL, idx, p);</div><div> const char *new_prompt = GetPrompt();</div><div>+ std::string str = lldb_utility::ansi::FormatAnsiTerminalCodes (new_prompt, GetUseColor());</div>
<div>+ if (str.length())</div><div>+ new_prompt = str.c_str();</div><div> EventSP prompt_change_event_sp (new Event(CommandInterpreter::eBroadcastBitResetPrompt, new EventDataBytes (new_prompt)));;</div><div>
GetCommandInterpreter().BroadcastEvent (prompt_change_event_sp);</div><div> }</div><div>@@ -297,6 +310,22 @@</div><div> return m_collection_sp->SetPropertyAtIndexAsBoolean (NULL, idx, b);</div><div> }</div><div>
</div><div>+bool</div><div>+Debugger::GetUseColor () const</div><div>+{</div><div>+ const uint32_t idx = ePropertyUseColor;</div><div>+ return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0);</div>
<div>+}</div><div>+</div><div>+bool</div><div>+Debugger::SetUseColor (bool b)</div><div>+{</div><div>+ const uint32_t idx = ePropertyUseColor;</div><div>+ bool ret = m_collection_sp->SetPropertyAtIndexAsBoolean (NULL, idx, b);</div>
<div>+ SetPrompt (GetPrompt());</div><div>+ return ret;</div><div>+}</div><div>+</div><div> uint32_t</div><div> Debugger::GetStopSourceLineCount (bool before) const</div><div> {</div><div>@@ -629,6 +658,11 @@</div>
<div>
OptionValueSInt64 *term_width = m_collection_sp->GetPropertyAtIndexAsOptionValueSInt64 (NULL, ePropertyTerminalWidth);</div><div> term_width->SetMinimumValue(10);</div><div> term_width->SetMaximumValue(1024);</div>
<div>+</div><div>+ // Turn off use-color if this is a dumb terminal.</div><div>+ const char *term = getenv ("TERM");</div><div>+ if (term && !strcmp (term, "dumb"))</div><div>+ SetUseColor (false);</div>
<div> }</div><div> </div><div> Debugger::~Debugger ()</div><div>@@ -1339,6 +1373,12 @@</div><div> bool success = true;</div><div> const char *p;</div><div> Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));</div>
<div>+</div><div>+ bool use_color = exe_ctx ? exe_ctx->GetTargetRef().GetDebugger().GetUseColor() : true;</div><div>+ std::string format_str = lldb_utility::ansi::FormatAnsiTerminalCodes (format, use_color);</div>
<div>+ if (format_str.length())</div><div>+ format = format_str.c_str();</div><div>+</div><div> for (p = format; *p != '\0'; ++p)</div><div> {</div><div> if (realvalobj)</div><div>@@ -1735,214 +1775,6 @@</div>
<div> format_addr = *addr;</div><div> }</div><div> }</div><div>- else if (::strncmp (var_name_begin, "ansi.", strlen("ansi.")) == 0)</div>
<div>- {</div><div>- var_success = true;</div><div>- var_name_begin += strlen("ansi."); // Skip the "ansi."</div>
<div>- if (::strncmp (var_name_begin, "fg.", strlen("fg.")) == 0)</div><div>- {</div><div>- var_name_begin += strlen("fg."); // Skip the "fg."</div>
<div>- if (::strncmp (var_name_begin, "black}", strlen("black}")) == 0)</div><div>- {</div><div>- s.Printf ("%s%s%s", </div>
<div>- lldb_utility::ansi::k_escape_start, </div><div>- lldb_utility::ansi::k_fg_black,</div><div>- lldb_utility::ansi::k_escape_end);</div>
<div>- }</div><div>- else if (::strncmp (var_name_begin, "red}", strlen("red}")) == 0)</div><div>- {</div>
<div>- s.Printf ("%s%s%s", </div><div>- lldb_utility::ansi::k_escape_start, </div><div>- lldb_utility::ansi::k_fg_red,</div>
<div>- lldb_utility::ansi::k_escape_end);</div><div>- }</div><div>- else if (::strncmp (var_name_begin, "green}", strlen("green}")) == 0)</div>
<div>- {</div><div>- s.Printf ("%s%s%s", </div><div>- lldb_utility::ansi::k_escape_start, </div>
<div>- lldb_utility::ansi::k_fg_green,</div><div>- lldb_utility::ansi::k_escape_end);</div><div>- }</div>
<div>- else if (::strncmp (var_name_begin, "yellow}", strlen("yellow}")) == 0)</div><div>- {</div><div>- s.Printf ("%s%s%s", </div>
<div>- lldb_utility::ansi::k_escape_start, </div><div>- lldb_utility::ansi::k_fg_yellow,</div><div>- lldb_utility::ansi::k_escape_end);</div>
<div>- }</div><div>- else if (::strncmp (var_name_begin, "blue}", strlen("blue}")) == 0)</div><div>- {</div>
<div>- s.Printf ("%s%s%s", </div><div>- lldb_utility::ansi::k_escape_start, </div><div>- lldb_utility::ansi::k_fg_blue,</div>
<div>- lldb_utility::ansi::k_escape_end);</div><div>- }</div><div>- else if (::strncmp (var_name_begin, "purple}", strlen("purple}")) == 0)</div>
<div>- {</div><div>- s.Printf ("%s%s%s", </div><div>- lldb_utility::ansi::k_escape_start, </div>
<div>- lldb_utility::ansi::k_fg_purple,</div><div>- lldb_utility::ansi::k_escape_end);</div><div>- }</div>
<div>- else if (::strncmp (var_name_begin, "cyan}", strlen("cyan}")) == 0)</div><div>- {</div><div>- s.Printf ("%s%s%s", </div>
<div>- lldb_utility::ansi::k_escape_start, </div><div>- lldb_utility::ansi::k_fg_cyan,</div><div>- lldb_utility::ansi::k_escape_end);</div>
<div>- }</div><div>- else if (::strncmp (var_name_begin, "white}", strlen("white}")) == 0)</div><div>- {</div>
<div>- s.Printf ("%s%s%s", </div><div>- lldb_utility::ansi::k_escape_start, </div><div>- lldb_utility::ansi::k_fg_white,</div>
<div>- lldb_utility::ansi::k_escape_end);</div><div>- }</div><div>- else</div><div>- {</div>
<div>- var_success = false;</div><div>- }</div><div>- }</div><div>- else if (::strncmp (var_name_begin, "bg.", strlen("bg.")) == 0)</div>
<div>- {</div><div>- var_name_begin += strlen("bg."); // Skip the "bg."</div><div>- if (::strncmp (var_name_begin, "black}", strlen("black}")) == 0)</div>
<div>- {</div><div>- s.Printf ("%s%s%s", </div><div>- lldb_utility::ansi::k_escape_start, </div>
<div>- lldb_utility::ansi::k_bg_black,</div><div>- lldb_utility::ansi::k_escape_end);</div><div>- }</div>
<div>- else if (::strncmp (var_name_begin, "red}", strlen("red}")) == 0)</div><div>- {</div><div>- s.Printf ("%s%s%s", </div>
<div>- lldb_utility::ansi::k_escape_start, </div><div>- lldb_utility::ansi::k_bg_red,</div><div>- lldb_utility::ansi::k_escape_end);</div>
<div>- }</div><div>- else if (::strncmp (var_name_begin, "green}", strlen("green}")) == 0)</div><div>- {</div>
<div>- s.Printf ("%s%s%s", </div><div>- lldb_utility::ansi::k_escape_start, </div><div>- lldb_utility::ansi::k_bg_green,</div>
<div>- lldb_utility::ansi::k_escape_end);</div><div>- }</div><div>- else if (::strncmp (var_name_begin, "yellow}", strlen("yellow}")) == 0)</div>
<div>- {</div><div>- s.Printf ("%s%s%s", </div><div>- lldb_utility::ansi::k_escape_start, </div>
<div>- lldb_utility::ansi::k_bg_yellow,</div><div>- lldb_utility::ansi::k_escape_end);</div><div>- }</div>
<div>- else if (::strncmp (var_name_begin, "blue}", strlen("blue}")) == 0)</div><div>- {</div><div>- s.Printf ("%s%s%s", </div>
<div>- lldb_utility::ansi::k_escape_start, </div><div>- lldb_utility::ansi::k_bg_blue,</div><div>- lldb_utility::ansi::k_escape_end);</div>
<div>- }</div><div>- else if (::strncmp (var_name_begin, "purple}", strlen("purple}")) == 0)</div><div>- {</div>
<div>- s.Printf ("%s%s%s", </div><div>- lldb_utility::ansi::k_escape_start, </div><div>- lldb_utility::ansi::k_bg_purple,</div>
<div>- lldb_utility::ansi::k_escape_end);</div><div>- }</div><div>- else if (::strncmp (var_name_begin, "cyan}", strlen("cyan}")) == 0)</div>
<div>- {</div><div>- s.Printf ("%s%s%s", </div><div>- lldb_utility::ansi::k_escape_start, </div>
<div>- lldb_utility::ansi::k_bg_cyan,</div><div>- lldb_utility::ansi::k_escape_end);</div><div>- }</div>
<div>- else if (::strncmp (var_name_begin, "white}", strlen("white}")) == 0)</div><div>- {</div><div>- s.Printf ("%s%s%s", </div>
<div>- lldb_utility::ansi::k_escape_start, </div><div>- lldb_utility::ansi::k_bg_white,</div><div>- lldb_utility::ansi::k_escape_end);</div>
<div>- }</div><div>- else</div><div>- {</div><div>- var_success = false;</div>
<div>- }</div><div>- }</div><div>- else if (::strncmp (var_name_begin, "normal}", strlen ("normal}")) == 0)</div>
<div>- {</div><div>- s.Printf ("%s%s%s", </div><div>- lldb_utility::ansi::k_escape_start, </div><div>
- lldb_utility::ansi::k_ctrl_normal,</div><div>- lldb_utility::ansi::k_escape_end);</div><div>- }</div>
<div>- else if (::strncmp (var_name_begin, "bold}", strlen("bold}")) == 0)</div><div>- {</div><div>- s.Printf ("%s%s%s", </div>
<div>- lldb_utility::ansi::k_escape_start, </div><div>- lldb_utility::ansi::k_ctrl_bold,</div><div>- lldb_utility::ansi::k_escape_end);</div>
<div>- }</div><div>- else if (::strncmp (var_name_begin, "faint}", strlen("faint}")) == 0)</div><div>- {</div>
<div>- s.Printf ("%s%s%s", </div><div>- lldb_utility::ansi::k_escape_start, </div><div>- lldb_utility::ansi::k_ctrl_faint,</div>
<div>- lldb_utility::ansi::k_escape_end);</div><div>- }</div><div>- else if (::strncmp (var_name_begin, "italic}", strlen("italic}")) == 0)</div>
<div>- {</div><div>- s.Printf ("%s%s%s", </div><div>- lldb_utility::ansi::k_escape_start, </div><div>
- lldb_utility::ansi::k_ctrl_italic,</div><div>- lldb_utility::ansi::k_escape_end);</div><div>- }</div>
<div>- else if (::strncmp (var_name_begin, "underline}", strlen("underline}")) == 0)</div><div>- {</div><div>- s.Printf ("%s%s%s", </div>
<div>- lldb_utility::ansi::k_escape_start, </div><div>- lldb_utility::ansi::k_ctrl_underline,</div><div>- lldb_utility::ansi::k_escape_end);</div>
<div>- }</div><div>- else if (::strncmp (var_name_begin, "slow-blink}", strlen("slow-blink}")) == 0)</div><div>- {</div>
<div>- s.Printf ("%s%s%s", </div><div>- lldb_utility::ansi::k_escape_start, </div><div>- lldb_utility::ansi::k_ctrl_slow_blink,</div>
<div>- lldb_utility::ansi::k_escape_end);</div><div>- }</div><div>- else if (::strncmp (var_name_begin, "fast-blink}", strlen("fast-blink}")) == 0)</div>
<div>- {</div><div>- s.Printf ("%s%s%s", </div><div>- lldb_utility::ansi::k_escape_start, </div><div>
- lldb_utility::ansi::k_ctrl_fast_blink,</div><div>- lldb_utility::ansi::k_escape_end);</div><div>- }</div>
<div>- else if (::strncmp (var_name_begin, "negative}", strlen("negative}")) == 0)</div><div>- {</div><div>- s.Printf ("%s%s%s", </div>
<div>- lldb_utility::ansi::k_escape_start, </div><div>- lldb_utility::ansi::k_ctrl_negative,</div><div>- lldb_utility::ansi::k_escape_end);</div>
<div>- }</div><div>- else if (::strncmp (var_name_begin, "conceal}", strlen("conceal}")) == 0)</div><div>- {</div>
<div>- s.Printf ("%s%s%s", </div><div>- lldb_utility::ansi::k_escape_start, </div><div>- lldb_utility::ansi::k_ctrl_conceal,</div>
<div>- lldb_utility::ansi::k_escape_end);</div><div>-</div><div>- }</div><div>- else if (::strncmp (var_name_begin, "crossed-out}", strlen("crossed-out}")) == 0)</div>
<div>- {</div><div>- s.Printf ("%s%s%s", </div><div>- lldb_utility::ansi::k_escape_start, </div><div>
- lldb_utility::ansi::k_ctrl_crossed_out,</div><div>- lldb_utility::ansi::k_escape_end);</div><div>- }</div>
<div>- else</div><div>- {</div><div>- var_success = false;</div><div>- }</div><div>- }</div>
<div> break;</div><div> </div><div> case 'p':</div><div>Index: tools/driver/Driver.cpp</div><div>===================================================================</div>
<div>--- tools/driver/Driver.cpp<span class="" style="white-space:pre"> </span>(revision 182486)</div><div>+++ tools/driver/Driver.cpp<span class="" style="white-space:pre"> </span>(working copy)</div><div>@@ -105,7 +105,9 @@</div>
<div> "Tells the debugger to open source files using the host's \"external editor\" mechanism." },</div><div> { LLDB_3_TO_5, false, "no-lldbinit" , 'x', no_argument , 0, eArgTypeNone,</div>
<div> "Do not automatically parse any '.lldbinit' files." },</div><div>- { LLDB_OPT_SET_6, true , "python-path" , 'P', no_argument , 0, eArgTypeNone,</div><div>
+ { LLDB_3_TO_5, false, "no-use-colors" , 'o', no_argument , 0, eArgTypeNone,</div><div>+ "Do not use colors." },</div><div>+ { LLDB_OPT_SET_6, true , "python-path" , 'P', no_argument , 0, eArgTypeNone,</div>
<div> "Prints out the path to the lldb.py file for this version of lldb." },</div><div> { 0, false, NULL , 0 , 0 , 0, eArgTypeNone, NULL }</div><div>
};</div><div>@@ -621,6 +623,10 @@</div><div> m_debugger.SkipAppInitFiles (true);</div><div> break;</div><div> </div><div>+ case 'o':</div><div>+ m_debugger.SetUseColor (false);</div>
<div>+ break;</div><div>+</div><div> case 'f':</div><div> {</div><div> SBFileSpec file(optarg);</div><div>Index: include/lldb/API/SBDebugger.h</div>
<div>===================================================================</div><div>--- include/lldb/API/SBDebugger.h<span class="" style="white-space:pre"> </span>(revision 182486)</div><div>+++ include/lldb/API/SBDebugger.h<span class="" style="white-space:pre"> </span>(working copy)</div>
<div>@@ -172,6 +172,12 @@</div><div> bool </div><div> GetUseExternalEditor ();</div><div> </div><div>+ bool</div><div>+ SetUseColor (bool use_color);</div><div>+</div><div>+ bool</div><div>+ GetUseColor () const;</div>
<div>+</div><div> static bool</div><div> GetDefaultArchitecture (char *arch_name, size_t arch_name_len);</div><div> </div><div>Index: source/API/SBDebugger.cpp</div><div>===================================================================</div>
<div>--- source/API/SBDebugger.cpp<span class="" style="white-space:pre"> </span>(revision 182486)</div><div>+++ source/API/SBDebugger.cpp<span class="" style="white-space:pre"> </span>(working copy)</div><div>@@ -1057,6 +1057,22 @@</div>
<div> }</div><div> </div><div> bool</div><div>+SBDebugger::SetUseColor (bool value)</div><div>+{</div><div>+ if (m_opaque_sp)</div><div>+ return m_opaque_sp->SetUseColor (value);</div><div>+ return false;</div>
<div>+}</div><div>+</div><div>+bool</div><div>+SBDebugger::GetUseColor () const</div><div>+{</div><div>+ if (m_opaque_sp)</div><div>+ return m_opaque_sp->GetUseColor ();</div><div>+ return false;</div><div>
+}</div><div>+</div><div>+bool</div><div> SBDebugger::GetDescription (SBStream &description)</div><div> {</div><div> Stream &strm = description.ref();</div></div><div><br></div></div>