Re: [PATCH v2 00/24] Multi-target support

John Baldwin
2020-01-09T19:32:01Z

On 10/29/19 12:13 PM, Pedro Alves wrote:
> On 10/18/19 9:22 PM, John Baldwin wrote:
>> On 10/17/19 3:50 PM, Pedro Alves wrote:
>>> Here's v2 of the multi-target patchset, which addresses all the review
>>> comments so far, I believe. Patch 15 is new, so all following patches
>>> are shifted by one.
>>>
>>> This time, I've adjusted the host-specific nat files to function API
>>> changes. I tried to find spots that would need changes using grep. I
>>> built the series on AIX, x86/SPARC Solaris, 64-bit Windows, x86
>>> GNU/Linux -m64/-m32, and Aarch64 GNU/Linux. I'm currently running
>>> this through the buildbot, will have results tomorrow. I don't expect
>>> any serious major issue, if any, as so far runs that completed seem
>>> OK.
>>
>> I (finally) have a patch to fix the build on FreeBSD/amd64 (and probably
>> FreeBSD on other platforms) here:
>>
>> https://github.com/bsdjhb/gdb/commit/e58a36eaef6244d2040ce6f377497ee898978db4
>>
>
> Thanks!
>
>> It's a combined patch but has some commentary on bsd-kvm.c which is
>> kind of special. That target adds new commands that need to find a
>> target to operate on. I opted to have it look at the current inferior
>> and if (using a dynamic cast) it is a bsd-kvm target the commands
>> modify the state of that inferior. I haven't tested it though as I don't
>> use bsd-kvm.c.
>
> I'd rather not merge the bsd-kvm.c parts into my patches as is, for the
> reason that it doesn't appear necessary for a minimal keep-working-as-before
> change. I think it would be fine as a follow up patch, though.

Ok, that's fine.

> For bsd-kvm.c, I _think_ that the only change necessary to keep things
> building would be this:
>
> --- a/gdb/bsd-kvm.c
> +++ b/gdb/bsd-kvm.c
> @@ -136,7 +136,7 @@ bsd_kvm_target_open (const char *arg, int from_tty)
> core_kd = temp_kd;
> push_target (&bsd_kvm_ops);
>
> - add_thread_silent (bsd_kvm_ptid);
> + add_thread_silent (&bsd_kvm_ops, bsd_kvm_ptid);
> inferior_ptid = bsd_kvm_ptid;
>
> Right? See updated patch below.

Ok, this works for me.

--
John Baldwin