Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Implement windows_nat_target::stop
@ 2026-04-11 14:32 Patrick Monnerat
  2026-04-14 15:47 ` Tom Tromey
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick Monnerat @ 2026-04-11 14:32 UTC (permalink / raw)
  To: gdb-patches; +Cc: Patrick Monnerat

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.
---
 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 e25ae81f054..d08faaa89ba 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;
 
-- 
2.53.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-15 12:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-11 14:32 [PATCH] Implement windows_nat_target::stop Patrick Monnerat
2026-04-14 15:47 ` Tom Tromey
2026-04-15 12:55   ` Patrick Monnerat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox