[binutils-gdb] Implement windows_nat_target::stop

Patrick Monnerat monnerat@sourceware.org
Thu Apr 23 07:55:54 GMT 2026


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d9fce21b2a8e323da0aaa9b09538aea7ac78ec37

commit d9fce21b2a8e323da0aaa9b09538aea7ac78ec37
Author: Patrick Monnerat <patrick@monnerat.net>
Date:   Sat Apr 4 14:52:48 2026 +0200

    Implement windows_nat_target::stop
    
    Insight makes a difference between hitting Ctrl-C (that triggers
    target::pass_ctrlc) and clicking the GUI stop button, triggering
    target::stop).
    
    As windows_nat did not implement the stop method, the GUI stop button
    was inoperant on Windows.

Diff:
---
 gdb/windows-nat.c | 6 ++++++
 gdb/windows-nat.h | 1 +
 2 files changed, 7 insertions(+)

diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 964d87c24ef..65dfc0c1800 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -909,6 +909,12 @@ windows_nat_target::pass_ctrlc ()
   interrupt ();
 }
 
+void
+windows_nat_target::stop (ptid_t ptid)
+{
+  interrupt ();
+}
+
 /* Get the next event from the child.  Returns the thread ptid.  */
 
 ptid_t
diff --git a/gdb/windows-nat.h b/gdb/windows-nat.h
index 8263729554b..4368a29b2bb 100644
--- a/gdb/windows-nat.h
+++ b/gdb/windows-nat.h
@@ -141,6 +141,7 @@ struct windows_nat_target : public inf_child_target
 
   void interrupt () override;
   void pass_ctrlc () override;
+  void stop (ptid_t ptid) override;
 
   const char *pid_to_exec_file (int pid) override;


More information about the Gdb-cvs mailing list