This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/7] Pass ptid to target_ops register methods
- From: Simon Marchi <simon dot marchi at polymtl dot ca>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: simon dot marchi at ericsson dot com, palves at redhat dot com, gdb-patches at sourceware dot org
- Date: Fri, 10 Mar 2017 12:51:52 -0500
- Subject: Re: [PATCH 0/7] Pass ptid to target_ops register methods
- Authentication-results: sourceware.org; auth=none
- References: <20170310171230.A9A22D806B1@oc3748833570.ibm.com>
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