Fixed the implementation of "bool Block::Contains (const Block *block) const"
to return the correct result.

Fixed "bool Variable::IsInScope (StackFrame *frame)" to return the correct
result when there are no location lists.

Modified the "frame variable" command such that:
- if no arguments are given (dump all frame variables), then we only show
  variables that are currently in scope
- if some arguments are given, we show an error if the variable is out of 
  scope

llvm-svn: 113830
diff --git a/lldb/source/Symbol/Block.cpp b/lldb/source/Symbol/Block.cpp
index a6e7f8f..8ad775f 100644
--- a/lldb/source/Symbol/Block.cpp
+++ b/lldb/source/Symbol/Block.cpp
@@ -239,17 +239,17 @@
 bool
 Block::Contains (const Block *block) const
 {
-    // Block objects can't contain themselves...
     if (this == block)
-        return false;
+        return false; // This block doesn't contain itself...
     
+    // Walk the parent chain for "block" and see if any if them match this block
     const Block *block_parent;
     for (block_parent = block->GetParent();
          block_parent != NULL;
          block_parent = block_parent->GetParent())
     {
-        if (block_parent == block)
-            return true;
+        if (this == block_parent)
+            return true; // One of the parents of "block" is this object!
     }
     return false;
 }