Re: [PATCH v2 02/24] Don't rely on inferior_ptid in record_full_wait

Tom Tromey
2019-11-01T14:54:48Z

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

Pedro> The multi-target patch sets inferior_ptid to null_ptid before handling
Pedro> a target event, and thus before calling target_wait, in order to catch
Pedro> places in target_ops::wait implementations that are incorrectly
Pedro> relying on inferior_ptid (which could otherwise be a ptid of a
Pedro> different target, for example).

I think it would be good to add a comment before target_ops::wait
explaining what is required from its implementation. If other
target_ops methods also cannot rely on inferior_ptid, then that
documentation should be updated as well. This would make it simpler to
know how to update an existing target, or to write a new target.

Tom