[PATCH v2 5/6] gdb/infrun: in condition evaluation do not stop all threads.
Natalia Saiapova
natalia.saiapova@intel.com
Fri Oct 9 11:27:17 GMT 2020
If a thread is evaluating a BP condition, do not stop other threads.
Some of them might be already resumed due to the condition being
evaluated as false.
gdb/ChangeLog:
2020-08-26 Natalia Saiapova <natalia.saiapova@intel.com>
Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
* infrun.c (stop_waiting): In condition evaluation do not stop
all threads.
Co-authored-by: Natalia Saiapova <natalia.saiapova@intel.com>
Co-authored-by: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Signed-off-by: Natalia Saiapova <natalia.saiapova@intel.com>
---
gdb/infrun.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/gdb/infrun.c b/gdb/infrun.c
index d260eb6e3a7..286af5abbe1 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -7764,9 +7764,15 @@ stop_waiting (struct execution_control_state *ecs)
/* Let callers know we don't want to wait for the inferior anymore. */
ecs->wait_some_more = 0;
+ bool in_cond_eval = ecs->event_thread != nullptr
+ && ecs->event_thread->control.in_cond_eval;
+
/* If all-stop, but there exists a non-stop target, stop all
- threads now that we're presenting the stop to the user. */
- if (!non_stop && exists_non_stop_target ())
+ threads now that we're presenting the stop to the user.
+ Do not stop, if the event thread is evaluating a BP condition.
+ This will be handled elsewhere depending on the result of
+ the condition. */
+ if (!non_stop && exists_non_stop_target () && !in_cond_eval)
stop_all_threads ();
}
--
2.17.1
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Gary Kershaw
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
More information about the Gdb-patches
mailing list