[PATCH v2 0/3] Reformatted Sparc GDB XML patches.

unisono@quyllur.org posted 3 patches 5 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250711155141.62916-1-unisono@quyllur.org
Maintainers: Laurent Vivier <laurent@vivier.eu>, "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Artyom Tarasenko <atar4qemu@gmail.com>
configs/targets/sparc-linux-user.mak       |  1 +
configs/targets/sparc-softmmu.mak          |  1 +
configs/targets/sparc32plus-linux-user.mak |  1 +
configs/targets/sparc64-linux-user.mak     |  1 +
configs/targets/sparc64-softmmu.mak        |  1 +
gdb-xml/sparc32-core.xml                   | 84 ++++++++++++++++++
gdb-xml/sparc64-core.xml                   | 99 ++++++++++++++++++++++
target/sparc/cpu.c                         |  2 +
8 files changed, 190 insertions(+)
create mode 100644 gdb-xml/sparc32-core.xml
create mode 100644 gdb-xml/sparc64-core.xml
[PATCH v2 0/3] Reformatted Sparc GDB XML patches.
Posted by unisono@quyllur.org 5 months, 1 week ago
From: Rot127 <unisono@quyllur.org>

Adds Sparc XML register files from GDB.

The xml files are copied from binutils-gdb.
The `*-core.xml` files are assembled from the sparc32-fpu.xml, sparc32-cp0.xml etc.
to match the registers defined by QEMU.

The addition is necessary if one wants to use the TCG plugins
with Sparc, because reading registers via the plugin API
just queries GDB.
The GDB stub initializes its register file with the `*-core.xml` files.
If they don't exist it returns no data.
Also relevant for debugging I assume.

v2:

Fixup for https://lore.kernel.org/qemu-devel/4887cd10-6126-489f-9e68-85b3ecdf0b3d@quyllur.org/

It removes the unused `*-fpu-.xml` and `*-cp0-.xml` and splits up the patches for each target.

Rot127 (3):
  Adds the GDB register XML files for Sparc64.
  Adds the GDB register XML files for Sparc32.
  Assign the GDB register XML files of Sparc64 to Sparc32plus.

 configs/targets/sparc-linux-user.mak       |  1 +
 configs/targets/sparc-softmmu.mak          |  1 +
 configs/targets/sparc32plus-linux-user.mak |  1 +
 configs/targets/sparc64-linux-user.mak     |  1 +
 configs/targets/sparc64-softmmu.mak        |  1 +
 gdb-xml/sparc32-core.xml                   | 84 ++++++++++++++++++
 gdb-xml/sparc64-core.xml                   | 99 ++++++++++++++++++++++
 target/sparc/cpu.c                         |  2 +
 8 files changed, 190 insertions(+)
 create mode 100644 gdb-xml/sparc32-core.xml
 create mode 100644 gdb-xml/sparc64-core.xml

-- 
2.50.0
Re: [PATCH v2 0/3] Reformatted Sparc GDB XML patches.
Posted by Alex Bennée 5 months, 1 week ago
unisono@quyllur.org writes:

> From: Rot127 <unisono@quyllur.org>
>
> Adds Sparc XML register files from GDB.
<snip>
>   Adds the GDB register XML files for Sparc32.
>   Assign the GDB register XML files of Sparc64 to Sparc32plus.

I'm holding of these two until I can get sparc32-linux-user tested. Our
coverage isn't currently great due to not having cross compilers. For
sparc32plus specifically is the sparc64 xml going to work given it is
using a 32 bit ABI.

What testing have you done with these two?

>
>  configs/targets/sparc-linux-user.mak       |  1 +
>  configs/targets/sparc-softmmu.mak          |  1 +
>  configs/targets/sparc32plus-linux-user.mak |  1 +
>  configs/targets/sparc64-linux-user.mak     |  1 +
>  configs/targets/sparc64-softmmu.mak        |  1 +
>  gdb-xml/sparc32-core.xml                   | 84 ++++++++++++++++++
>  gdb-xml/sparc64-core.xml                   | 99 ++++++++++++++++++++++
>  target/sparc/cpu.c                         |  2 +
>  8 files changed, 190 insertions(+)
>  create mode 100644 gdb-xml/sparc32-core.xml
>  create mode 100644 gdb-xml/sparc64-core.xml

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro
Re: [PATCH v2 0/3] Reformatted Sparc GDB XML patches.
Posted by Rot127 5 months, 1 week ago
 > What testing have you done with these two?

None with Sparc32 and Sparc32plus. Also because I don't have immediate 
access to a toolchain. But I have to do Sparc32 eventually as well and 
can report back then.

For Sparc64 I use it in a the TCG plugin as described.
And it works as expected.

But haven't tested more unfortunately.
I wanted to get the patches out early, so you can consider adding it 
into v10.1.

On 7/14/25 05:59, Alex Bennée wrote:
> unisono@quyllur.org writes:
> 
>> From: Rot127 <unisono@quyllur.org>
>>
>> Adds Sparc XML register files from GDB.
> <snip>
>>    Adds the GDB register XML files for Sparc32.
>>    Assign the GDB register XML files of Sparc64 to Sparc32plus.
> 
> I'm holding of these two until I can get sparc32-linux-user tested. Our
> coverage isn't currently great due to not having cross compilers. For
> sparc32plus specifically is the sparc64 xml going to work given it is
> using a 32 bit ABI.
> 
> What testing have you done with these two?
> 
>>
>>   configs/targets/sparc-linux-user.mak       |  1 +
>>   configs/targets/sparc-softmmu.mak          |  1 +
>>   configs/targets/sparc32plus-linux-user.mak |  1 +
>>   configs/targets/sparc64-linux-user.mak     |  1 +
>>   configs/targets/sparc64-softmmu.mak        |  1 +
>>   gdb-xml/sparc32-core.xml                   | 84 ++++++++++++++++++
>>   gdb-xml/sparc64-core.xml                   | 99 ++++++++++++++++++++++
>>   target/sparc/cpu.c                         |  2 +
>>   8 files changed, 190 insertions(+)
>>   create mode 100644 gdb-xml/sparc32-core.xml
>>   create mode 100644 gdb-xml/sparc64-core.xml
>