[PATCH 0/5][Resend] Fix multiple Ctrl-C/Quit issues
Pedro Alves
palves@redhat.com
Mon Nov 6 23:27:00 GMT 2017
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
More information about the Gdb-patches
mailing list