* thread.c (thread_apply_command): Move making the cleanup out of

the loop.
This commit is contained in:
Pedro Alves 2008-07-11 11:26:39 +00:00
parent c5e38e547e
commit 65fc9b7721
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2008-07-11 Pedro Alves <pedro@codesourcery.com>
* thread.c (thread_apply_command): Move making the cleanup out of
the loop.
2008-07-11 Pedro Alves <pedro@codesourcery.com>
Exited threads.

View File

@ -1102,6 +1102,8 @@ thread_apply_command (char *tidlist, int from_tty)
else
end = start;
make_cleanup_restore_current_thread ();
for (; start <= end; start++)
{
tp = find_thread_id (start);
@ -1112,8 +1114,6 @@ thread_apply_command (char *tidlist, int from_tty)
warning (_("Thread %d has terminated."), start);
else
{
make_cleanup_restore_current_thread ();
if (non_stop)
context_switch_to (tp->ptid);
else