This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v4 2/9] add "this" pointers to more target APIs


>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Tom> I'll remove "is_async".  Unless you'd rather I remove "can_async".

Pedro> No, that's fine.  "is_async" would be my choice as well.

I looked deeper than the two are still subtly different.
Specifically, remote.c delegates to serial:

  return serial_can_async_p (rs->remote_desc);
  return serial_is_async_p (rs->remote_desc);

And these really do differ:

    int
    serial_can_async_p (struct serial *scb)
    {
      return (scb->ops->async != NULL);
    }

    int
    serial_is_async_p (struct serial *scb)
    {
      return (scb->ops->async != NULL) && (scb->async_handler != NULL);
    }


I find it a bit odd that the upper layers rely on the serial layer to do
this bookkeeping.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]