From: Tom Tromey <tom@tromey.com>
To: Pedro Alves <pedro@palves.net>
Cc: Hannes Domani <ssbssa@yahoo.de>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH v2] gdb/Windows: Fix detach while running
Date: Mon, 15 Apr 2024 11:02:11 -0600 [thread overview]
Message-ID: <878r1e36gc.fsf@tromey.com> (raw)
In-Reply-To: <625b2dbb-6cb8-40dd-b7d0-fbce48cb5436@palves.net> (Pedro Alves's message of "Fri, 12 Apr 2024 14:41:47 +0100")
>>>>> "Pedro" == Pedro Alves <pedro@palves.net> writes:
Pedro> Still in windows_nat_target::detach, we have an interesting issue that
Pedro> ends up being the bulk of the patch -- only the process_thread thread
Pedro> can call DebugActiveProcessStop, but if it is blocked in
Pedro> WaitForDebugEvent, we need to somehow force it to break out of it.
Pedro> The only way to do that, is to force the inferior to do something that
Pedro> causes WaitForDebugEvent to return some event.
I generally like the Windows debug API but I can't really understand why
they didn't integrate WaitForDebugEvent with WaitForMultipleObjects --
it seems like such an obvious thing to do and it would have saved so
many headaches.
I didn't read the patch in too much detail, but I did look over it and I
read through the explanation. It all makes sense to me.
I was wondering if something similar is needed for gdbserver?
I assume not though.
Reviewed-By: Tom Tromey <tom@tromey.com>
Tom
next prev parent reply other threads:[~2024-04-15 17:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-11 20:03 [PATCH] " Pedro Alves
2024-04-12 10:56 ` Hannes Domani
2024-04-12 13:41 ` [PATCH v2] " Pedro Alves
2024-04-15 17:02 ` Tom Tromey [this message]
2024-04-17 17:57 ` Pedro Alves
2024-04-17 18:18 ` Pedro Alves
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=878r1e36gc.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro@palves.net \
--cc=ssbssa@yahoo.de \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).