forked from Imagelibrary/binutils-gdb
Decouple target_interrupt from all-stop/non-stop modes
In non-stop mode, "interrupt" results in a "stop with no signal", while in all-stop mode, it results in a remote interrupt request / stop with SIGINT. This is currently implemented in both the Linux and remote target backends. Move it to the core code instead, making target_interrupt specifically always about "Interrupting as if with Ctrl-C", just like it is documented. gdb/ChangeLog: 2016-04-12 Pedro Alves <palves@redhat.com> * infcmd.c (interrupt_target_1): Call target_stop is in non-stop mode. * linux-nat.c (linux_nat_interrupt): Delete. (linux_nat_add_target): Don't install linux_nat_interrupt. * remote.c (remote_interrupt_ns): Change return type to void. Throw error if interrupting the target is not supported. (remote_interrupt): Don't call the remote_stop_ns/remote_stop_as.
This commit is contained in:
@@ -4462,15 +4462,6 @@ linux_nat_stop (struct target_ops *self, ptid_t ptid)
|
||||
iterate_over_lwps (ptid, linux_nat_stop_lwp, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
linux_nat_interrupt (struct target_ops *self, ptid_t ptid)
|
||||
{
|
||||
if (non_stop)
|
||||
iterate_over_lwps (ptid, linux_nat_stop_lwp, NULL);
|
||||
else
|
||||
linux_ops->to_interrupt (linux_ops, ptid);
|
||||
}
|
||||
|
||||
static void
|
||||
linux_nat_close (struct target_ops *self)
|
||||
{
|
||||
@@ -4672,7 +4663,6 @@ linux_nat_add_target (struct target_ops *t)
|
||||
t->to_close = linux_nat_close;
|
||||
|
||||
t->to_stop = linux_nat_stop;
|
||||
t->to_interrupt = linux_nat_interrupt;
|
||||
|
||||
t->to_supports_multi_process = linux_nat_supports_multi_process;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user