This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] misc cleanups to linux_nat_close
- From: Doug Evans <dje at google dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Mon, 25 Aug 2014 12:20:23 -0700
- Subject: Re: [PATCH] misc cleanups to linux_nat_close
- Authentication-results: sourceware.org; auth=none
- References: <yjt2a971tmpy dot fsf at ruffy dot mtv dot corp dot google dot com> <53F3811B dot 7090706 at redhat dot com>
On Tue, Aug 19, 2014 at 9:53 AM, Pedro Alves <palves@redhat.com> wrote:
> On 08/19/2014 12:14 AM, Doug Evans wrote:
>> Hi.
>>
>> I think this falls under obvious, but in case anyone wants to comment ...
>
> Yeah, it was one of those "to fix later" things, while to_close didn't
> gain a self pointer:
>
> https://sourceware.org/ml/gdb-patches/2014-01/msg00424.html
>
> Thanks for doing this.
>
> --
> Pedro Alves
>
>>
>> 2014-08-18 Doug Evans <dje@google.com>
>>
>> * linux-nat.c (linux_nat_close): Don't pass NULL for "this".
>> Pass NULL instead of 0 for context pointer.
>>
>> diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
>> index 1e8991d..0898442 100644
>> --- a/gdb/linux-nat.c
>> +++ b/gdb/linux-nat.c
>> @@ -4813,8 +4813,8 @@ static void
>> linux_nat_close (struct target_ops *self)
>> {
>> /* Unregister from the event loop. */
>> - if (linux_nat_is_async_p (NULL))
>> - linux_nat_async (NULL, NULL, 0);
>> + if (linux_nat_is_async_p (self))
>> + linux_nat_async (self, NULL, NULL);
>>
>> if (linux_ops->to_close)
>> linux_ops->to_close (linux_ops);
Pushed.