diff options
author | Pedro Alves <palves@redhat.com> | 2008-07-11 11:26:39 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2008-07-11 11:26:39 +0000 |
commit | 65fc9b77211c67d97824de129cfa0945be80ded0 (patch) | |
tree | f31a0a89a95ab80619fd09afee051c2c75646466 /gdb/thread.c | |
parent | c5e38e547e14e9f282c9d98a7c70272cecdcac10 (diff) | |
download | gdb-65fc9b77211c67d97824de129cfa0945be80ded0.zip gdb-65fc9b77211c67d97824de129cfa0945be80ded0.tar.gz gdb-65fc9b77211c67d97824de129cfa0945be80ded0.tar.bz2 |
* thread.c (thread_apply_command): Move making the cleanup out of
the loop.
Diffstat (limited to 'gdb/thread.c')
-rw-r--r-- | gdb/thread.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/thread.c b/gdb/thread.c index c3a63fc..8a17147 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -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 |