aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/lldb/source/Commands/CommandObjectLog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/lldb/source/Commands/CommandObjectLog.cpp')
-rw-r--r--contrib/llvm-project/lldb/source/Commands/CommandObjectLog.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/contrib/llvm-project/lldb/source/Commands/CommandObjectLog.cpp b/contrib/llvm-project/lldb/source/Commands/CommandObjectLog.cpp
index c63d8ce4f9e4..5dd6f8989837 100644
--- a/contrib/llvm-project/lldb/source/Commands/CommandObjectLog.cpp
+++ b/contrib/llvm-project/lldb/source/Commands/CommandObjectLog.cpp
@@ -177,6 +177,20 @@ protected:
return false;
}
+ if ((m_options.handler != eLogHandlerCircular &&
+ m_options.handler != eLogHandlerStream) &&
+ m_options.buffer_size.GetCurrentValue() != 0) {
+ result.AppendError("a buffer size can only be specified for the circular "
+ "and stream buffer handler.\n");
+ return false;
+ }
+
+ if (m_options.handler != eLogHandlerStream && m_options.log_file) {
+ result.AppendError(
+ "a file name can only be specified for the stream handler.\n");
+ return false;
+ }
+
// Store into a std::string since we're about to shift the channel off.
const std::string channel = std::string(args[0].ref());
args.Shift(); // Shift off the channel
@@ -490,7 +504,7 @@ public:
protected:
bool DoExecute(Args &args, CommandReturnObject &result) override {
- Timer::DumpCategoryTimes(&result.GetOutputStream());
+ Timer::DumpCategoryTimes(result.GetOutputStream());
Timer::SetDisplayDepth(0);
result.SetStatus(eReturnStatusSuccessFinishResult);
@@ -513,7 +527,7 @@ public:
protected:
bool DoExecute(Args &args, CommandReturnObject &result) override {
- Timer::DumpCategoryTimes(&result.GetOutputStream());
+ Timer::DumpCategoryTimes(result.GetOutputStream());
result.SetStatus(eReturnStatusSuccessFinishResult);
if (!result.Succeeded()) {