[Lldb-commits] [PATCH] D123015: handle Ctrl+C to stop a running process

Luboš Luňák via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 7 13:00:22 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGf42f21746cb8: [lldb][gui] handle Ctrl+C to stop a running process (authored by llunak).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123015/new/

https://reviews.llvm.org/D123015

Files:
  lldb/include/lldb/Interpreter/CommandInterpreter.h
  lldb/source/Core/IOHandlerCursesGUI.cpp


Index: lldb/source/Core/IOHandlerCursesGUI.cpp
===================================================================
--- lldb/source/Core/IOHandlerCursesGUI.cpp
+++ lldb/source/Core/IOHandlerCursesGUI.cpp
@@ -7710,7 +7710,9 @@
 
 void IOHandlerCursesGUI::Cancel() {}
 
-bool IOHandlerCursesGUI::Interrupt() { return false; }
+bool IOHandlerCursesGUI::Interrupt() {
+  return m_debugger.GetCommandInterpreter().IOHandlerInterrupt(*this);
+}
 
 void IOHandlerCursesGUI::GotEOF() {}
 
Index: lldb/include/lldb/Interpreter/CommandInterpreter.h
===================================================================
--- lldb/include/lldb/Interpreter/CommandInterpreter.h
+++ lldb/include/lldb/Interpreter/CommandInterpreter.h
@@ -610,6 +610,8 @@
 
   bool IsInteractive();
 
+  bool IOHandlerInterrupt(IOHandler &io_handler) override;
+
 protected:
   friend class Debugger;
 
@@ -623,8 +625,6 @@
     return ConstString();
   }
 
-  bool IOHandlerInterrupt(IOHandler &io_handler) override;
-
   void GetProcessOutput();
 
   bool DidProcessStopAbnormally() const;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123015.421323.patch
Type: text/x-patch
Size: 1055 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220407/516a3d14/attachment.bin>


More information about the lldb-commits mailing list