This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC 01/32] add "this" pointers to more target APIs
- From: Tom Tromey <tromey at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 14 Jan 2014 13:25:49 -0700
- Subject: Re: [RFC 01/32] add "this" pointers to more target APIs
- Authentication-results: sourceware.org; auth=none
- References: <1389640367-5571-1-git-send-email-tromey at redhat dot com> <1389640367-5571-2-git-send-email-tromey at redhat dot com> <52D52930 dot 5060702 at redhat dot com>
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>> /* Unregister from the event loop. */
>> - if (linux_nat_is_async_p ())
>> - linux_nat_async (NULL, 0);
>> + if (linux_nat_is_async_p (linux_ops))
>> + linux_nat_async (linux_ops, NULL, 0);
Pedro> I still think linux_ops is the wrong target to
Pedro> use here.
I'm sorry if I missed some earlier review note of it.
It wasn't intentional.
Pedro> While to_close doesn't have a self
Pedro> pointer, I'd suggest using NULL or adding a comment
Pedro> (or storing the multi-threaded target pointer in a
Pedro> global, though given the target really isn't used,
Pedro> that's probably overkill).
Yes, I agree. I used "NULL".
The native targets are unusual because, in gdb's design, they are
inherently singletons.
Tom