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.
This commit is contained in:
parent
187c4a2b7b
commit
fd115a4b71
3 changed files with 8 additions and 10 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2009-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2009-07-07 Vladimir Prus <vladimir@codesourcery.com>
|
2009-07-07 Vladimir Prus <vladimir@codesourcery.com>
|
||||||
|
|
||||||
Fix hang in floating varobjs.
|
Fix hang in floating varobjs.
|
||||||
|
|
|
@ -606,8 +606,7 @@ mi_cmd_var_update (char *command, char **argv, int argc)
|
||||||
do_cleanups (cleanup);
|
do_cleanups (cleanup);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cr = rootlist;
|
for (cr = rootlist; *cr != NULL; cr++)
|
||||||
while (*cr != NULL)
|
|
||||||
{
|
{
|
||||||
int thread_id = varobj_get_thread_id (*cr);
|
int thread_id = varobj_get_thread_id (*cr);
|
||||||
int thread_stopped = 0;
|
int thread_stopped = 0;
|
||||||
|
@ -624,7 +623,6 @@ mi_cmd_var_update (char *command, char **argv, int argc)
|
||||||
if (thread_stopped)
|
if (thread_stopped)
|
||||||
if (*name == '*' || varobj_floating_p (*cr))
|
if (*name == '*' || varobj_floating_p (*cr))
|
||||||
varobj_update_one (*cr, print_values, 0 /* implicit */);
|
varobj_update_one (*cr, print_values, 0 /* implicit */);
|
||||||
cr++;
|
|
||||||
}
|
}
|
||||||
do_cleanups (cleanup);
|
do_cleanups (cleanup);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3225,16 +3225,13 @@ varobj_invalidate (void)
|
||||||
|
|
||||||
if (varobj_list (&all_rootvarobj) > 0)
|
if (varobj_list (&all_rootvarobj) > 0)
|
||||||
{
|
{
|
||||||
varp = all_rootvarobj;
|
for (varp = all_rootvarobj; *varp != NULL; varp++)
|
||||||
while (*varp != NULL)
|
|
||||||
{
|
{
|
||||||
/* Floating varobjs are reparsed on each stop, so we don't care if
|
/* Floating varobjs are reparsed on each stop, so we don't care if
|
||||||
the presently parsed expression refers to something that's gone.
|
the presently parsed expression refers to something that's gone.
|
||||||
*/
|
*/
|
||||||
if ((*varp)->root->floating) {
|
if ((*varp)->root->floating)
|
||||||
varp++;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
/* global var must be re-evaluated. */
|
/* global var must be re-evaluated. */
|
||||||
if ((*varp)->root->valid_block == NULL)
|
if ((*varp)->root->valid_block == NULL)
|
||||||
|
@ -3256,8 +3253,6 @@ varobj_invalidate (void)
|
||||||
}
|
}
|
||||||
else /* locals must be invalidated. */
|
else /* locals must be invalidated. */
|
||||||
(*varp)->root->is_valid = 0;
|
(*varp)->root->is_valid = 0;
|
||||||
|
|
||||||
varp++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
xfree (all_rootvarobj);
|
xfree (all_rootvarobj);
|
||||||
|
|
Loading…
Reference in a new issue