Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: gdb-patches@sourceware.org
Subject: [PATCH 0/7] GDB busy loop when interrupting non-stop program (PR 26199)
Date: Mon,  6 Jul 2020 20:02:45 +0100	[thread overview]
Message-ID: <20200706190252.22552-1-pedro@palves.net> (raw)

This patch series fixes PR 26199, a GDB 10 blocker.

I discussed how to fix this with Simon, and we came to the conclusion
that we can fix it by removing code.  Easy.  :-) That's the last patch
in the series.

Well, not so easy, actually... :-/

Doing that alone caused gdb.multi/multi-target.exp to regress.  And
the reason was that the fix for PR 261299 made that testcase trip on a
few latent bugs...  One of those bugs also caused a similar 100% cpu
busy loop.

And then, while fixing those, I added a new test scenario to
gdb.multi/multi-target.exp to exercise the TARGET_WAITKIND_NO_RESUMED
handling fixes in this series.  That new test requires sending Ctrl-C
to GDB after the test is done with, in order to cleanly kill gdbserver
via "monitor exit".  But, that Ctrl-C didn't work, due to an issue
with GDB's terminal handling, GDB would just hang...

That's all fixed by this series.

Pedro Alves (6):
  Fix spurious unhandled remote %Stop notifications
  Fix latent bug in target_pass_ctrlc
  Avoid constant stream of TARGET_WAITKIND_NO_RESUMED
  Fix handle_no_resumed w/ multiple targets
  Make handle_no_resumed transfer terminal
  Testcase for previous handle_no_resumed fixes

Simon Marchi (1):
  Fix GDB busy loop when interrupting non-stop program (PR 26199)

 gdb/infrun.c                             | 116 +++++++++++++++++++++----------
 gdb/remote.c                             |  15 +++-
 gdb/target.c                             |   2 +-
 gdb/testsuite/gdb.multi/multi-target.c   |   4 +-
 gdb/testsuite/gdb.multi/multi-target.exp |  76 ++++++++++++++++++++
 5 files changed, 173 insertions(+), 40 deletions(-)


base-commit: ad8464f799a4c96c7ab8bdfec3f95846cf54f9b0
-- 
2.14.5



             reply	other threads:[~2020-07-06 19:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-06 19:02 Pedro Alves [this message]
2020-07-06 19:02 ` [PATCH 1/7] Fix spurious unhandled remote %Stop notifications Pedro Alves
2020-12-12 22:13   ` Andrew Burgess
2020-12-13  0:46     ` Simon Marchi via Gdb-patches
2020-07-06 19:02 ` [PATCH 2/7] Fix latent bug in target_pass_ctrlc Pedro Alves
2020-07-06 19:02 ` [PATCH 3/7] Avoid constant stream of TARGET_WAITKIND_NO_RESUMED Pedro Alves
2020-07-06 19:02 ` [PATCH 4/7] Fix handle_no_resumed w/ multiple targets Pedro Alves
2020-07-06 19:02 ` [PATCH 5/7] Make handle_no_resumed transfer terminal Pedro Alves
2020-07-06 19:02 ` [PATCH 6/7] Testcase for previous handle_no_resumed fixes Pedro Alves
2020-07-06 19:02 ` [PATCH 7/7] Fix GDB busy loop when interrupting non-stop program (PR 26199) Pedro Alves
2020-07-06 21:28 ` [PATCH 0/7] " Simon Marchi
2020-07-07  0:25   ` Pedro Alves
2020-07-07  1:27     ` Pedro Alves
2020-07-07  1:29       ` Pedro Alves
2020-07-10 23:02 ` 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=20200706190252.22552-1-pedro@palves.net \
    --to=pedro@palves.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