From 751b8ce122ef06e9bd673542e7876f44dcd0165c Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 20 May 2011 16:20:25 +0000 Subject: [PATCH] 2011-05-20 Pedro Alves gdb/ * infcmd.c (step_1): Simplify synchronous case. --- gdb/ChangeLog | 4 ++++ gdb/infcmd.c | 24 +++++++++++------------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8bb74ed..de59f42 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2011-05-20 Pedro Alves + * infcmd.c (step_1): Simplify synchronous case. + +2011-05-20 Pedro Alves + * tracepoint.c: Include exceptions.h. (TFILE_PID): Move higher in file. (tfile_open): Delay pushing the tfile target until we're assured 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; + } } } -- 2.7.4