[Lldb-commits] [lldb] r116114 - /lldb/trunk/source/Interpreter/CommandObject.cpp

Johnny Chen johnny.chen at apple.com
Fri Oct 8 15:01:53 PDT 2010


Author: johnny
Date: Fri Oct  8 17:01:52 2010
New Revision: 116114

URL: http://llvm.org/viewvc/llvm-project?rev=116114&view=rev
Log:
Emit a diagnostic message instead of crashing when an argument entry is missing.

Modified:
    lldb/trunk/source/Interpreter/CommandObject.cpp

Modified: lldb/trunk/source/Interpreter/CommandObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandObject.cpp?rev=116114&r1=116113&r2=116114&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandObject.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandObject.cpp Fri Oct  8 17:01:52 2010
@@ -508,7 +508,12 @@
     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





More information about the lldb-commits mailing list