diff options
author | Johnny Chen <johnny.chen@apple.com> | 2010-10-08 22:01:52 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2010-10-08 22:01:52 +0000 |
commit | e6acf35582b78da9a2f495109f5e34d7adf54792 (patch) | |
tree | 8c177581404d4ddb905e0236e955bcb123d5031a /lldb/source/Interpreter | |
parent | fc3642b2053bd0d0772851307dde9e68ebbd8c6d (diff) | |
download | bcm5719-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.cpp | 7 |
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 |