From be0ff6854b762416768ecc3cb992cc006c262caa Mon Sep 17 00:00:00 2001 From: klugier Date: Sun, 29 Jul 2018 14:25:40 +0000 Subject: [PATCH] Gdb: Limit CPU usage by introducing non agressive GuiSleep in GdbCmd.cpp. Moreover fix issue when GDB interface is still active after setting live breakpoint. git-svn-id: svn://ultimatepp.org/upp/trunk@12115 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/ide/Debuggers/Gdb.cpp | 3 +-- uppsrc/ide/Debuggers/GdbCmd.cpp | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/uppsrc/ide/Debuggers/Gdb.cpp b/uppsrc/ide/Debuggers/Gdb.cpp index 9a7c213d5..04d5f1523 100644 --- a/uppsrc/ide/Debuggers/Gdb.cpp +++ b/uppsrc/ide/Debuggers/Gdb.cpp @@ -330,10 +330,9 @@ String Gdb::DoRun() IdeSetBar(); } - ClearCtrls(); - String s; for(;;) { + ClearCtrls(); s = Cmdp("continue"); if(IsNull(bp_filename)) break; diff --git a/uppsrc/ide/Debuggers/GdbCmd.cpp b/uppsrc/ide/Debuggers/GdbCmd.cpp index 880be3633..e825676a2 100644 --- a/uppsrc/ide/Debuggers/GdbCmd.cpp +++ b/uppsrc/ide/Debuggers/GdbCmd.cpp @@ -134,8 +134,9 @@ String Gdb::Cmd(const char *command) ProcessEvents(); ms0 = msecs(); } -// if(s.GetCount() == 0) - GuiSleep(0); + + GuiSleep(50); + if(TTYQuit()) Stop(); }