From dff044040520af1d334cd74c973786fd53955065 Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Sat, 12 May 2012 00:38:30 +0000 Subject: Add a useful error message to "log enable" with the wrong number of arguments, and reject "log enable lldb" which just silently did nothing before. llvm-svn: 156686 --- lldb/source/Commands/CommandObjectLog.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lldb/source/Commands/CommandObjectLog.cpp') diff --git a/lldb/source/Commands/CommandObjectLog.cpp b/lldb/source/Commands/CommandObjectLog.cpp index 611c76b961c..3e85ff93b98 100644 --- a/lldb/source/Commands/CommandObjectLog.cpp +++ b/lldb/source/Commands/CommandObjectLog.cpp @@ -114,9 +114,9 @@ public: Execute (Args& args, CommandReturnObject &result) { - if (args.GetArgumentCount() < 1) + if (args.GetArgumentCount() < 2) { - result.AppendErrorWithFormat("Usage: %s\n", m_cmd_syntax.c_str()); + result.AppendErrorWithFormat("%s takes a log channel and one or more log types.\n", m_cmd_name.c_str()); } else { @@ -264,7 +264,7 @@ public: const size_t argc = args.GetArgumentCount(); if (argc == 0) { - result.AppendErrorWithFormat("Usage: %s\n", m_cmd_syntax.c_str()); + result.AppendErrorWithFormat("%s takes a log channel and one or more log types.\n", m_cmd_name.c_str()); } else { -- cgit v1.2.3