Re: [PATCH v2] gdb/hppa: guess g packet size

Simon Marchi
2025-11-10T17:11:04Z

On 11/10/25 11:52 AM, Simon Marchi wrote:
> I'm not super familiar with remote target descriptions, here's my
> understanding of what is happening, please let me know if this is
> correct. The target descriptions you create are never actually used are
> target descriptions, but are just some "flags" to indicate whether the g
> packet size guess resulted in 32 or 64. It seems a bit silly / strange
> to use a target description this way, but perhaps there's no better way
> with what we currently have. Are there other arches in GDB that work
> this way, that I could reference as "prior art"?

Actually, I checked it myself, it's not too difficult. It seems like
MIPS does something like that, although it also seems to support "real"
target descriptions, given it does:

/* Check any target description for validity. */
if (tdesc_has_registers (info.target_desc))
...

I also checked QEMU's repo [1], it doesn't seem to have a target
description for the hppa architecture.

[1] https://github.com/qemu/qemu/tree/593aee5df98b4a862ff8841a57ea3dbf22131a5f/gdb-xml

Simon