From: Patrick Monnerat <patrick@monnerat.net>
To: gdb-patches@sourceware.org
Cc: Patrick Monnerat <patrick@monnerat.net>
Subject: [PATCH] Implement windows_nat_target::stop
Date: Sat, 11 Apr 2026 16:32:43 +0200 [thread overview]
Message-ID: <20260411143242.143320-2-patrick@monnerat.net> (raw)
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
next reply other threads:[~2026-04-11 14:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-11 14:32 Patrick Monnerat [this message]
2026-04-14 15:47 ` Tom Tromey
2026-04-15 12:55 ` Patrick Monnerat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260411143242.143320-2-patrick@monnerat.net \
--to=patrick@monnerat.net \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox