summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2010-10-08 22:01:52 +0000
committerJohnny Chen <johnny.chen@apple.com>2010-10-08 22:01:52 +0000
commite6acf35582b78da9a2f495109f5e34d7adf54792 (patch)
tree8c177581404d4ddb905e0236e955bcb123d5031a /lldb/source/Interpreter
parentfc3642b2053bd0d0772851307dde9e68ebbd8c6d (diff)
downloadbcm5719-llvm-e6acf35582b78da9a2f495109f5e34d7adf54792.tar.gz
bcm5719-llvm-e6acf35582b78da9a2f495109f5e34d7adf54792.zip
Emit a diagnostic message instead of crashing when an argument entry is missing.
llvm-svn: 116114
Diffstat (limited to 'lldb/source/Interpreter')
-rw-r--r--lldb/source/Interpreter/CommandObject.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp
index 5e2ef9a2d22..2210fc850a3 100644
--- a/lldb/source/Interpreter/CommandObject.cpp
+++ b/lldb/source/Interpreter/CommandObject.cpp
@@ -508,7 +508,12 @@ CommandObject::GetArgumentName (CommandArgumentType arg_type)
if (entry->arg_type != arg_type)
entry = CommandObject::FindArgumentDataByType (arg_type);
- return entry->arg_name;
+ if (entry)
+ return entry->arg_name;
+
+ StreamString str;
+ str << "Arg name for type (" << arg_type << ") not in arg table!";
+ return str.GetData();
}
bool
OpenPOWER on IntegriCloud