aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectLog.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2012-05-12 00:38:30 +0000
committerJim Ingham <jingham@apple.com>2012-05-12 00:38:30 +0000
commitdff044040520af1d334cd74c973786fd53955065 (patch)
tree26fca696019c0a78d756f58ae00a060defe5f121 /lldb/source/Commands/CommandObjectLog.cpp
parent165473247f3569bf2985abd3244b3e0c69290698 (diff)
downloadllvm-dff044040520af1d334cd74c973786fd53955065.zip
llvm-dff044040520af1d334cd74c973786fd53955065.tar.gz
llvm-dff044040520af1d334cd74c973786fd53955065.tar.bz2
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
Diffstat (limited to 'lldb/source/Commands/CommandObjectLog.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectLog.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectLog.cpp b/lldb/source/Commands/CommandObjectLog.cpp
index 611c76b..3e85ff9 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
{