Re: [PATCH 00/28] Decouple inferior_ptid/inferior_thread(); dup ptids in thread list (PR/25412)

Tom Tromey
2020-04-17T20:20:32Z

>>>>> "Pedro" == Pedro Alves via Gdb-patches <gdb-patches@sourceware.org> writes:

I meant to mention, I skimmed through this series and didn't see
anything objectionable. It's hard to know about this kind of thing
without trying it (which I didn't do); but IMO it's fine to land this
and then iron out anything that pops up.

Pedro> After this, inferior_ptid still exists, but it is mostly read-only and
Pedro> mainly used by target backend code.

Could it be made completely read-only?

Pedro> It is also relied on by a number
Pedro> of target methods as a global input argument. E.g., the target_resume
Pedro> interface and the memory reading routines -- we still need it there
Pedro> because we need to be able to access memory off of processes for which
Pedro> we don't have a corresponding inferior/thread object, like when
Pedro> handling forks. Maybe we could pass down a context explicitly to
Pedro> target_read_memory, etc.

This sounds like a good direction.

Tom