[RFC 01/32] add "this" pointers to more target APIs

Tom Tromey tromey@redhat.com
Tue Jan 14 20:25:00 GMT 2014


>>>>> "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



More information about the Gdb-patches mailing list