--- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -2313,6 +2313,7 @@ linux_wait_1 (ptid_t ptid, int maybe_internal_trap; int report_to_gdb; int trace_event; + int condition_true; /* Translate generic target options into linux options. */ options = __WALL; @@ -2615,6 +2616,9 @@ Check if we're already there.\n", goto retry; } + condition_true = gdb_breakpoint_here (event_child->stop_pc) + && gdb_condition_true_at_breakpoint (event_child->stop_pc); + /* If GDB wanted this thread to single step, we always want to report the SIGTRAP, and let GDB handle it. Watchpoints should always be reported. So should signals we can't explain. A @@ -2628,11 +2632,11 @@ Check if we're already there.\n", || event_child->stopped_by_watchpoint || (!step_over_finished && !bp_explains_trap && !trace_event) - || (gdb_breakpoint_here (event_child->stop_pc) - && gdb_condition_true_at_breakpoint (event_child->stop_pc) + || (condition_true && gdb_no_commands_at_breakpoint (event_child->stop_pc))); - run_breakpoint_commands (event_child->stop_pc); + if (condition_true) + run_breakpoint_commands (event_child->stop_pc); /* We found no reason GDB would want us to stop. We either hit one of our own breakpoints, or finished an internal step GDB