From e46fae884dfb4e90d0a2bdf45e1eb7053e831641 Mon Sep 17 00:00:00 2001 From: micio Date: Mon, 30 Apr 2012 08:32:05 +0000 Subject: [PATCH] Ide/Debuggers/Gdb_MI2 : stop ALL threads after a breakpoint is hit instead of letting other threads run git-svn-id: svn://ultimatepp.org/upp/trunk@4882 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/ide/Debuggers/Gdb_MI2.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/uppsrc/ide/Debuggers/Gdb_MI2.cpp b/uppsrc/ide/Debuggers/Gdb_MI2.cpp index a8d2d7917..83d98d8af 100644 --- a/uppsrc/ide/Debuggers/Gdb_MI2.cpp +++ b/uppsrc/ide/Debuggers/Gdb_MI2.cpp @@ -109,7 +109,16 @@ void Gdb_MI2::Run() } Unlock(); if(stopped) + { CheckStopReason(); + + // as we are in non-stop mode, to allow async break to work + // we shall stop ALL running threads here, otherwise we'll have + // problems when single stepping a gui MT app + // single step will be done so for a single thread, while other + // are idle. Maybe we could make this behaviour optional + MICmd("exec-interrupt --all"); + } started = stopped = false; firstRun = false;