diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1dc2ab0cba..1f7aed035d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2015-11-17 Yao Qi + + * infrun.c (resume): Check control.trap_expected only + when deciding the set of threads to resume. + 2015-11-17 Pedro Alves * cp-namespace.c (cp_lookup_bare_symbol) diff --git a/gdb/infrun.c b/gdb/infrun.c index d1b0e128ab..b14f34cbc0 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -2656,14 +2656,17 @@ resume (enum gdb_signal sig) gdb_assert (!(thread_has_single_step_breakpoints_set (tp) && step)); /* Decide the set of threads to ask the target to resume. */ - if ((step || thread_has_single_step_breakpoints_set (tp)) - && tp->control.trap_expected) + if (tp->control.trap_expected) { /* We're allowing a thread to run past a breakpoint it has - hit, by single-stepping the thread with the breakpoint - removed. In which case, we need to single-step only this - thread, and keep others stopped, as they can miss this - breakpoint if allowed to run. */ + hit, either by single-stepping the thread with the breakpoint + removed, or by displaced stepping, with the breakpoint inserted. + In the former case, we need to single-step only this thread, + and keep others stopped, as they can miss this breakpoint if + allowed to run. That's not really a problem for displaced + stepping, but, we still keep other threads stopped, in case + another thread is also stopped for a breakpoint waiting for + its turn in the displaced stepping queue. */ resume_ptid = inferior_ptid; } else