Many times during my recent activities I saw invalid frame error message. I 
found it totally useless - it does not give any clue why the error happened. It 
turned out that it can occur due to obvious reasons: no target selected, no 
process launched etc. With this patch it is easier to guess root cause of this 
error and save hours of unnecessary investigation.

http://reviews.llvm.org/D5374

Files:
  source/Interpreter/CommandObject.cpp
Index: source/Interpreter/CommandObject.cpp
===================================================================
--- source/Interpreter/CommandObject.cpp
+++ source/Interpreter/CommandObject.cpp
@@ -248,6 +248,9 @@
         
         if ((flags & eFlagRequiresFrame) && !m_exe_ctx.HasFrameScope())
         {
+            if (!m_exe_ctx.HasTargetScope()) result.AppendError (GetInvalidTargetDescription());
+            if (!m_exe_ctx.HasProcessScope()) result.AppendError (GetInvalidProcessDescription());
+            if (!m_exe_ctx.HasThreadScope()) result.AppendError (GetInvalidThreadDescription());
             result.AppendError (GetInvalidFrameDescription());
             return false;
         }
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to