Re: [PATCH v3 12/17] Fix interrupt-noterm.exp on targets always in non-stop

Pedro Alves
2015-04-22T20:03:40Z

On 04/21/2015 12:40 PM, Yao Qi wrote:
> Pedro Alves <palves@redhat.com> writes:
>
>> Most of the patch is an across-the-board rename of to_stop hook
>> implementations to to_interrupt. The only targets where something
>
> except on gnu-nat.c,

Ah, yes.

>
>> more than a rename is being done are linux-nat.c and remote.c, which
>> are the only targets that support async, and thus are the only ones
>> the core side calls target_stop on.
>>
>> gdb/ChangeLog:
>> 2015-04-17 Pedro Alves <palves@redhat.com>
>>
>> * darwin-nat.c (darwin_stop): Rename to ...
>> (darwin_interrupt): ... this.
>> (_initialize_darwin_inferior): Adjust.
>> * gnu-nat.c (gnu_stop): Delete.
>> (gnu_thread_alive): Don't install gnu_stop.
> ^^^^^^^^^^^^^^^^^ gnu_target

Whoops, fixed.

>
>> diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
>> index d830773..4753634 100644
>> --- a/gdb/gnu-nat.c
>> +++ b/gdb/gnu-nat.c
>> @@ -2271,12 +2271,6 @@ gnu_terminal_init (struct target_ops *self)
>> child_terminal_init_with_pgrp (gnu_current_inf->pid);
>> }
>>
>> -static void
>> -gnu_stop (struct target_ops *self, ptid_t ptid)
>> -{
>> - error (_("to_stop target function not implemented"));
>> -}
>> -
>> static int
>> gnu_thread_alive (struct target_ops *ops, ptid_t ptid)
>> {
>> @@ -2686,7 +2680,6 @@ gnu_target (void)
>> t->to_mourn_inferior = gnu_mourn_inferior;
>> t->to_thread_alive = gnu_thread_alive;
>> t->to_pid_to_str = gnu_pid_to_str;
>> - t->to_stop = gnu_stop;
>>
>> return t;
>> }
>
> Any reason you don't install to_interrupt for gnu-nat?

I'll sent the gnu-nat change as a separate patch, along with
the rationale.

--
Pedro Alves