diff options
author | Pedro Alves <palves@redhat.com> | 2011-05-20 16:20:25 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2011-05-20 16:20:25 +0000 |
commit | 751b8ce122ef06e9bd673542e7876f44dcd0165c (patch) | |
tree | d5dacec249fcb52f0eb0a699e18d84836114c9ee /gdb/infcmd.c | |
parent | 67e9eb74af1c9e7fd75cf7820fd3282757bef119 (diff) | |
download | fsf-binutils-gdb-751b8ce122ef06e9bd673542e7876f44dcd0165c.zip fsf-binutils-gdb-751b8ce122ef06e9bd673542e7876f44dcd0165c.tar.gz fsf-binutils-gdb-751b8ce122ef06e9bd673542e7876f44dcd0165c.tar.bz2 |
2011-05-20 Pedro Alves <pedro@codesourcery.com>
gdb/
* infcmd.c (step_1): Simplify synchronous case.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r-- | gdb/infcmd.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c index be1f0a5..ab1f2f9 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -889,23 +889,21 @@ step_1 (int skip_subroutines, int single_inst, char *count_string) { for (; count > 0; count--) { - struct thread_info *tp; - step_once (skip_subroutines, single_inst, count, thread); - if (target_has_execution - && !ptid_equal (inferior_ptid, null_ptid)) - tp = inferior_thread (); + if (!target_has_execution) + break; else - tp = NULL; - - if (!tp || !tp->control.stop_step || !tp->step_multi) { - /* If we stopped for some reason that is not stepping - there are no further steps to make. */ - if (tp) - tp->step_multi = 0; - break; + struct thread_info *tp = inferior_thread (); + + if (!tp->control.stop_step || !tp->step_multi) + { + /* If we stopped for some reason that is not stepping + there are no further steps to make. */ + tp->step_multi = 0; + break; + } } } |