On 2/27/26 1:40 PM, Philippe Mathieu-Daudé wrote:
On 27/2/26 14:09, Philippe Mathieu-Daudé wrote:
On 27/2/26 10:58, Philippe Mathieu-Daudé wrote:
Hi Florian,
on current master (d8a9d97317d03190b34498741f98f22e2a9afe3e), the basic
gdb stub test fails for ppc-linux-user when running "make check-tcg".
I've debugged around a bit but I don't know my way around the gdbstub
internals enough to propose a patch right away, so I'll just summarize
what I figured out so far.
1. Due to cc->gdb_num_core_regs not being set explicitly anymore, it is
set to 0 at the end of gdbstub/gdbstub.c:gdb_init_cpu(). In the same
function, cpu->gdb_num_regs gets set to 70.
2. When the test tries to read a register in gdbstub/
gdbstub.c:gdb_read_register(),
the first condition of "reg < cc->gdb_num_core_regs" is always
false.
Also, the register number for fpscr passed to the function is is
103,
and cpu->gdb_num_regs is also 103. If the register number is
supposed
to be an index (as I understand it), this would indicate an
off-by-one error somewhere.
If you have some pointers on where to look / what to check out for
fixing this, I'll happily try to work on a patch. But I suppose that
somebody more experienced with this could probably fix this much faster
than I can.
I'll have a look.
Short term, this seems to fix it:
Series for the generic fix posted:
https://lore.kernel.org/qemu-devel/[email protected]/
Broken link, and unknown series.
Can you send the good one?
Regards,
Pierrick