aboutsummaryrefslogtreecommitdiff
path: root/gdb/varobj.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2009-07-07 09:26:13 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2009-07-07 09:26:13 +0000
commitfd115a4b71c8d9f4315641b00f00acdb5c6ae4a0 (patch)
tree2a09a96faca9731f64713867d5ce29fb1a4da688 /gdb/varobj.c
parent187c4a2b7be39d56d38008039f2284715e3580a9 (diff)
downloadgdb-fd115a4b71c8d9f4315641b00f00acdb5c6ae4a0.zip
gdb-fd115a4b71c8d9f4315641b00f00acdb5c6ae4a0.tar.gz
gdb-fd115a4b71c8d9f4315641b00f00acdb5c6ae4a0.tar.bz2
gdb/
* mi/mi-cmd-var.c (mi_cmd_var_update): Replace a while loop by for loop. * varobj.c (varobj_invalidate): Replace a while loop by for loop.
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r--gdb/varobj.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c
index e846362..dac0413 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -3225,16 +3225,13 @@ varobj_invalidate (void)
if (varobj_list (&all_rootvarobj) > 0)
{
- varp = all_rootvarobj;
- while (*varp != NULL)
+ for (varp = all_rootvarobj; *varp != NULL; varp++)
{
/* Floating varobjs are reparsed on each stop, so we don't care if
the presently parsed expression refers to something that's gone.
*/
- if ((*varp)->root->floating) {
- varp++;
+ if ((*varp)->root->floating)
continue;
- }
/* global var must be re-evaluated. */
if ((*varp)->root->valid_block == NULL)
@@ -3256,8 +3253,6 @@ varobj_invalidate (void)
}
else /* locals must be invalidated. */
(*varp)->root->is_valid = 0;
-
- varp++;
}
}
xfree (all_rootvarobj);