public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/17096] async support breaks remote debugging on Windows
Date: Mon, 07 Jul 2014 18:00:00 -0000	[thread overview]
Message-ID: <bug-17096-4717-FuwtGADYPG@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-17096-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=17096

--- Comment #13 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The branch, master has been updated
       via  b2ee242b93e9580406e03abb18ff969de7de1976 (commit)
      from  3510a7b805f8ad1345b9d2671a21a40a09d9f2a2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

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

commit b2ee242b93e9580406e03abb18ff969de7de1976
Author: Pedro Alves <palves@redhat.com>
Date:   Mon Jul 7 17:51:04 2014 +0100

    PR gdb/17096: async support breaks remote debugging on Windows

    On Windows, with "maint set target-async on" (the default since
    a09dd441), Ctrl-C fails to stop a remote target.

    With maint target-async on, the SIGINT signal handler doesn't send the
    remote interrupt request immediately.  Instead, it marks an async
    handler as ready, and then the main event loop wakes up and notices
    that the SIGINT async signal handler token was set, and calls the
    corresponding event handler, which sends the remote interrupt request.

    On POSIX-like systems, the SIGINT signal makes the select/poll in the
    main event loop wake up / return with EINTR.  However, on Windows,
    signal handlers run on a separate thread, and Windows doesn't really
    have a concept of EINTR.  So, just marking the async handler
    (effectively just setting a flag) does not wake up gdb_select.
    Instead, we need to call gdb_call_async_signal_handler from the signal
    handler.  The Windows version (in mingw-hdep.c) sets a Windows event
    that gdb_select's WaitForMultipleObjects is waiting for.

    Confirmed that with this, Ctrl-C interrupts the remote target on
    Windows.  Also regression tested on x86_64 Fedora 20 against
    GDBserver.

    gdb/
    2014-07-07  Pedro Alves  <palves@redhat.com>

        * remote.c (async_handle_remote_sigint)
        (async_handle_remote_sigint_twice): Call
        gdb_call_async_signal_handler instead of
        mark_async_signal_handler.

-----------------------------------------------------------------------

Summary of changes:
 gdb/ChangeLog |    7 +++++++
 gdb/remote.c  |    7 +++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


  parent reply	other threads:[~2014-07-07 18:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-27  8:33 [Bug gdb/17096] New: " freddie_chopin at op dot pl
2014-06-27  8:35 ` [Bug gdb/17096] " freddie_chopin at op dot pl
2014-06-27 11:27 ` palves at redhat dot com
2014-06-27 15:25 ` freddie_chopin at op dot pl
2014-06-27 15:32 ` freddie_chopin at op dot pl
2014-06-27 16:47 ` palves at redhat dot com
2014-06-27 16:49 ` palves at redhat dot com
2014-06-27 17:08 ` freddie_chopin at op dot pl
2014-06-27 17:15 ` palves at redhat dot com
2014-06-29  7:55 ` freddie_chopin at op dot pl
2014-07-07 16:30 ` palves at redhat dot com
2014-07-07 16:39 ` freddie_chopin at op dot pl
2014-07-07 18:00 ` cvs-commit at gcc dot gnu.org [this message]
2014-07-07 18:06 ` cvs-commit at gcc dot gnu.org
2014-07-07 18:11 ` cvs-commit at gcc dot gnu.org
2014-07-07 18:15 ` palves at redhat dot com
2014-07-07 18:35 ` freddie_chopin at op dot pl

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=bug-17096-4717-FuwtGADYPG@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).