Re: [PATCH v3 0/8] gdbserver improvements for AArch64 SVE support

Thiago Jung Bauermann
2024-05-07T16:36:56Z

Hello Felix, Hello Luis,

Luis Machado <luis.machado@arm.com> writes:

> Hi,
>
> On 5/7/24 15:29, Willgerodt, Felix wrote:
>>> -----Original Message-----
>>> From: Gdb-patches <gdb-patches-
>>> bounces+felix.willgerodt=intel.com@sourceware.org> On Behalf Of Thiago Jung
>>> Bauermann via Gdb-patches
>>>
>>> This is version 3 of the patch series adding support to gdbserver for
>>> inferiors that change the SVE vector length at runtime. This is already
>>> supported by GDB, but not by gdbserver. Version 2 was posted here:
>>
>> I wonder what happened to this series. Do you plan to revive it at some
>> point? I realise this isn't an easy series to land. Tough it would be great
>> to have in my view.
>
> I think it is an essential piece to make gdbserver work correctly for both
> SVE and SME (and similar features on other architectures), as well as enabling
> remote debugging stubs to support vector size changes mid-execution.
>
> Thiago was the last one to touch this code, so he may have better information on
> future plans.
>
> Unfortunately I don't have cycles to get back to this particular feature at the
> moment, but I'd gladly review future iterations of the series.

Thank you for your interest in this series! I think it's very important
too, and it nags me that I haven't been able to finish it yet. I gave up
on the approach from this patch series, which was to have a different
target description for each register size, which implies a different
target description for each inferior thread.

I have a branch where I implemented support in the XML target
description to specify a register whose size is given by a math
expression involving other registers. This way, a single target
description is enough for the whole duration of the inferior execution,
and for all inferior threads. But it still has significant bugs, and
only occasionally I have been able to get back to it and try to move it
forward. I pushed what I have to the sve-tdesc-dynamic-size branch at
this repo, if you would like to have a look:

https://git.linaro.org/people/thiago.bauermann/binutils-gdb.git

If you "git diff 1bdabb9e9fe8..<remote>/sve-tdesc-dynamic-size" you can
see the code.

I think I will be able to work on it again in a month or two. If you
think my approach is good and the branch is a good starting point for
you, feel free to work on it. I'd be happy to collaborate.

--
Thiago