public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/5][Resend] Fix multiple Ctrl-C/Quit issues
@ 2017-11-06 23:27 Pedro Alves
  2017-11-06 23:27 ` [PATCH 1/5] Fix swallowed "Quit" when inserting breakpoints Pedro Alves
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Pedro Alves @ 2017-11-06 23:27 UTC (permalink / raw)
  To: gdb-patches

As I mentioned before, I've been messing with GDB's terminal handling
in context of multi-target.  While doing some inflow.c surgery, I had
the bright idea of writing a test that did:

  break foo
  commands
    printf "hello\n"
    continue

and run that against a program that does basically:

  while (1)
    foo ();

and then while the inferior is running and hitting that breakpoint,
hit Ctrl-C, to make sure target_terminal::inferior/ours handling was
correct and that the user always re-gained control.

Unfortunately, that test hit a number of other, preexisting
problems...  (I never learn...  :-P)  This series fixes them, and then
adds a testcase similar to the above.  The test passes cleanly with
the fixes in place, but fails otherwise.

Pedro Alves (5):
  Fix swallowed "Quit" when inserting breakpoints
  Fix stdin ending up not registered after a Quit
  Don't ever Quit out of resume
  Python unwinder sniffer: PyExc_KeyboardInterrupt -> Quit
  Test breakpoint commands w/ "continue" + Ctrl-C

 gdb/breakpoint.c                                   |  41 ++++---
 gdb/inf-loop.c                                     |  10 +-
 gdb/infrun.c                                       |  43 ++-----
 gdb/python/py-unwind.c                             |   7 ++
 gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.c   |  35 ++++++
 gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp | 136 +++++++++++++++++++++
 6 files changed, 216 insertions(+), 56 deletions(-)
 create mode 100644 gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.c
 create mode 100644 gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp

-- 
2.5.5

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

end of thread, other threads:[~2017-12-11 11:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-06 23:27 [PATCH 0/5][Resend] Fix multiple Ctrl-C/Quit issues Pedro Alves
2017-11-06 23:27 ` [PATCH 1/5] Fix swallowed "Quit" when inserting breakpoints Pedro Alves
2017-11-06 23:27 ` [PATCH 2/5] Fix stdin ending up not registered after a Quit Pedro Alves
2017-11-06 23:27 ` [PATCH 4/5] Python unwinder sniffer: PyExc_KeyboardInterrupt -> Quit Pedro Alves
2017-11-06 23:27 ` [PATCH 5/5] Test breakpoint commands w/ "continue" + Ctrl-C Pedro Alves
2017-11-06 23:27 ` [PATCH 3/5] Don't ever Quit out of resume Pedro Alves
2017-12-09  1:21   ` Maciej W. Rozycki
2017-12-11 11:20     ` Pedro Alves
2017-11-16 18:47 ` [PATCH 0/5][Resend] Fix multiple Ctrl-C/Quit issues Pedro Alves

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).