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 0/7] Pass ptid to target_ops register methods


On 2017-03-10 12:12, Ulrich Weigand wrote:
Basically, we should move the above from the call site into all
implementations of the routine, and then push it down as far as
possible until it hopefully disappears in most cases.

That makes senses. The good news is that this can be done incrementally, unlike the present patch series, which required changing the signature of methods used all over the place. At least one implentation of target_fetch/store_registers (bsd-uthread) needs to read or write memory, and therefore will need to save/restore inferior_ptid. But the big majority of them won't need to do it.

Yes, the target routines must only be called on a regcache that is
associated with a ptid.

You'll probably need to add a get_regcache_ptid() routine or so;
that routine should assert that the regcache has a ptid.

That sounds right.  Thanks for the tips!

Simon


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