aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2020-06-09 10:21:09 -0700
committerJonas Devlieghere <jonas@devlieghere.com>2020-06-09 10:45:45 -0700
commitde019b88dd5804ec996fe8c12cddcc6feb13afa1 (patch)
treea21779363a65262f657354b00eef1e7be681555c /lldb/source/Commands/CommandObjectWatchpointCommand.cpp
parent1f48f8f6e289d3ae14d28ad9bd000ef5ba209fc0 (diff)
downloadllvm-de019b88dd5804ec996fe8c12cddcc6feb13afa1.zip
llvm-de019b88dd5804ec996fe8c12cddcc6feb13afa1.tar.gz
llvm-de019b88dd5804ec996fe8c12cddcc6feb13afa1.tar.bz2
[lldb/Interpreter] Support color in CommandReturnObject
Color the error: and warning: part of the CommandReturnObject output, similar to how an error is printed from the driver when colors are enabled. Differential revision: https://reviews.llvm.org/D81058
Diffstat (limited to 'lldb/source/Commands/CommandObjectWatchpointCommand.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectWatchpointCommand.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
index 11bf88d..fe3052a 100644
--- a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
@@ -282,12 +282,12 @@ are no syntax errors may indicate that a function was declared but never called.
ExecutionContext exe_ctx(context->exe_ctx_ref);
Target *target = exe_ctx.GetTargetPtr();
if (target) {
- CommandReturnObject result;
Debugger &debugger = target->GetDebugger();
+ CommandReturnObject result(debugger.GetUseColor());
+
// Rig up the results secondary output stream to the debugger's, so the
// output will come out synchronously if the debugger is set up that
// way.
-
StreamSP output_stream(debugger.GetAsyncOutputStream());
StreamSP error_stream(debugger.GetAsyncErrorStream());
result.SetImmediateOutputStream(output_stream);