[Lldb-commits] [lldb] r170167 - /lldb/trunk/tools/driver/Driver.cpp
Enrico Granata
egranata at apple.com
Thu Dec 13 16:52:54 PST 2012
Author: enrico
Date: Thu Dec 13 18:52:54 2012
New Revision: 170167
URL: http://llvm.org/viewvc/llvm-project?rev=170167&view=rev
Log:
Trigger the display of error and output in sourced commands from the result object's status instead of the presence of text in the error stream
This should be more consistent with the notion of command success/failure and avoids spewing warnings that the user might not care about
There will need to be an option to specify the level of verbosity desired (never show anything, only show failures, errors and warning, everything)
Modified:
lldb/trunk/tools/driver/Driver.cpp
Modified: lldb/trunk/tools/driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Driver.cpp?rev=170167&r1=170166&r2=170167&view=diff
==============================================================================
--- lldb/trunk/tools/driver/Driver.cpp (original)
+++ lldb/trunk/tools/driver/Driver.cpp Thu Dec 13 18:52:54 2012
@@ -1349,13 +1349,14 @@
}
// if the command sourcing generated an error - dump the result object
- const size_t error_size = result.GetErrorSize();
- if (error_size > 0)
+ if (result.Succeeded() == false)
{
const size_t output_size = result.GetOutputSize();
if (output_size > 0)
m_io_channel_ap->OutWrite (result.GetOutput(dump_stream_only_if_no_immediate), output_size, NO_ASYNC);
- m_io_channel_ap->OutWrite (result.GetError(dump_stream_only_if_no_immediate), error_size, NO_ASYNC);
+ const size_t error_size = result.GetErrorSize();
+ if (error_size > 0)
+ m_io_channel_ap->OutWrite (result.GetError(dump_stream_only_if_no_immediate), error_size, NO_ASYNC);
}
result.Clear();
More information about the lldb-commits
mailing list