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

Tom Tromey tom@tromey.com
Fri Apr 17 20:20:30 GMT 2020


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


More information about the Gdb-patches mailing list