Author: Luboš Luňák Date: 2022-04-07T21:58:37+02:00 New Revision: f42f21746cb8b940518bf37e5917d61542d278b7
URL: https://github.com/llvm/llvm-project/commit/f42f21746cb8b940518bf37e5917d61542d278b7 DIFF: https://github.com/llvm/llvm-project/commit/f42f21746cb8b940518bf37e5917d61542d278b7.diff LOG: [lldb][gui] handle Ctrl+C to stop a running process Differential Revision: https://reviews.llvm.org/D123015 Added: Modified: lldb/include/lldb/Interpreter/CommandInterpreter.h lldb/source/Core/IOHandlerCursesGUI.cpp Removed: ################################################################################ diff --git a/lldb/include/lldb/Interpreter/CommandInterpreter.h b/lldb/include/lldb/Interpreter/CommandInterpreter.h index 641e651e18909..f1f715c891a5c 100644 --- a/lldb/include/lldb/Interpreter/CommandInterpreter.h +++ b/lldb/include/lldb/Interpreter/CommandInterpreter.h @@ -610,6 +610,8 @@ class CommandInterpreter : public Broadcaster, bool IsInteractive(); + bool IOHandlerInterrupt(IOHandler &io_handler) override; + protected: friend class Debugger; @@ -623,8 +625,6 @@ class CommandInterpreter : public Broadcaster, return ConstString(); } - bool IOHandlerInterrupt(IOHandler &io_handler) override; - void GetProcessOutput(); bool DidProcessStopAbnormally() const; diff --git a/lldb/source/Core/IOHandlerCursesGUI.cpp b/lldb/source/Core/IOHandlerCursesGUI.cpp index caf88c7fdf376..c8d86f0e1128a 100644 --- a/lldb/source/Core/IOHandlerCursesGUI.cpp +++ b/lldb/source/Core/IOHandlerCursesGUI.cpp @@ -7710,7 +7710,9 @@ IOHandlerCursesGUI::~IOHandlerCursesGUI() = default; void IOHandlerCursesGUI::Cancel() {} -bool IOHandlerCursesGUI::Interrupt() { return false; } +bool IOHandlerCursesGUI::Interrupt() { + return m_debugger.GetCommandInterpreter().IOHandlerInterrupt(*this); +} void IOHandlerCursesGUI::GotEOF() {} _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits