diff options
author | Pedro Alves <palves@redhat.com> | 2018-01-31 13:45:06 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2018-01-31 13:45:06 +0000 |
commit | f6cfb42730ed37bfb32cb27ef627df930f437f08 (patch) | |
tree | bbe22d2f3cfc32677da08f81ae60731190b7cc1e /gdb/inflow.c | |
parent | bf3077a6c3c9ff21c072a6f42c91bffefd35bc15 (diff) | |
download | gdb-f6cfb42730ed37bfb32cb27ef627df930f437f08.zip gdb-f6cfb42730ed37bfb32cb27ef627df930f437f08.tar.gz gdb-f6cfb42730ed37bfb32cb27ef627df930f437f08.tar.bz2 |
gdb: Fix remote-sim/MinGW/Darwin builds
The recent commit e671cd59 ("Per-inferior target_terminal state, fix
PR gdb/13211, more") missed adjusting a few targets to the new
target_ops->to_interrupt interface, breaking the build for those
targets. This fixes it.
Note: remote-sim doesn't really support async execution, so I don't
think gdbsim_interrupt is ever reached via target_interrupt. (It is
reached via gdbsim_cntrl_c though).
The inflow.c changes are a bit ugly, but they're just doing what other
parts of the file already do to handle the same missing functions.
Targets that don't have 'kill', like mingw have their own
target_ops->to_interrupt implementation, so it's fine to make
child_interrupt be a nop.
gdb/ChangeLog:
2018-01-31 Pedro Alves <palves@redhat.com>
* darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
* inflow.c (child_terminal_save_inferior): Wrap reference to
tcgetpgrp in HAVE_TERMIOS_H.
(child_interrupt, child_pass_ctrlc): Wrap references to signal in
_WIN32.
* remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
always iterate over all inferiors.
(gdbsim_cntrl_c): Adjust.
* windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
Diffstat (limited to 'gdb/inflow.c')
-rw-r--r-- | gdb/inflow.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/inflow.c b/gdb/inflow.c index 7c5e904..d971543 100644 --- a/gdb/inflow.c +++ b/gdb/inflow.c @@ -469,7 +469,9 @@ child_terminal_save_inferior (struct target_ops *self) xfree (tinfo->ttystate); tinfo->ttystate = serial_get_tty_state (stdin_serial); +#ifdef HAVE_TERMIOS_H tinfo->process_group = tcgetpgrp (0); +#endif #ifdef F_GETFL tinfo->tflags = fcntl (0, F_GETFL, 0); @@ -563,7 +565,9 @@ child_interrupt (struct target_ops *self) either Ctrl-C or with kill(3) with negative PID) sends a SIGINT to each process in the process group, and we may not be debugging all processes in the process group. */ +#ifndef _WIN32 kill (resumed->inf->pid, SIGINT); +#endif } } @@ -606,7 +610,9 @@ child_pass_ctrlc (struct target_ops *self) { gdb_assert (inf->pid != 0); +#ifndef _WIN32 kill (inf->pid, SIGINT); +#endif return; } } |