(c_value_of_root): Don't select frame if variable
authorNick Roberts <nickrob@snap.net.nz>
Fri, 5 Jan 2007 21:58:48 +0000 (21:58 +0000)
committerNick Roberts <nickrob@snap.net.nz>
Fri, 5 Jan 2007 21:58:48 +0000 (21:58 +0000)
object is out of scope.

gdb/varobj.c

index 056cf58f65091c10d2805c1b55053f560668a93d..e24bcd396d4c73141278f2b8075a4812586cea00 100644 (file)
@@ -1970,7 +1970,8 @@ c_value_of_root (struct varobj **var_handle)
          if (pc <  BLOCK_START (var->root->valid_block) ||
              pc >= BLOCK_END (var->root->valid_block))
            within_scope = 0;
-         select_frame (fi);
+         else
+           select_frame (fi);
        }         
     }