Philippe Mathieu-Daudé <address@hidden> writes:
gdbstub/m68k seems broken with floats, previous to refactor commit
a010bdbe719 ("extend GByteArray to read register helpers").
HEAD at 6fb1603aa2:
$ qemu-system-m68k -s -S -cpu cfv4e
---[GUEST]---
(gdb) set architecture m68k:cfv4e
The target architecture is assumed to be m68k:cfv4e
(gdb) target remote 172.17.0.1:1234
Remote debugging using 172.17.0.1:1234
(gdb) info float
fp0 -nan(0xfffffffffff7f) (raw 0xffffffffffffff7f)
fp1 -nan(0xfffffffffff7f) (raw 0xffffffffffffff7f)
fp2 -nan(0xfffffffffff7f) (raw 0xffffffffffffff7f)
fp3 -nan(0xfffffffffff7f) (raw 0xffffffffffffff7f)
fp4 -nan(0xfffffffffff7f) (raw 0xffffffffffffff7f)
fp5 -nan(0xfffffffffff7f) (raw 0xffffffffffffff7f)
fp6 -nan(0xfffffffffff7f) (raw 0xffffffffffffff7f)
fp7 -nan(0xfffffffffff7f) (raw 0xffffffffffffff7f)
fpcontrol 0x0 0
fpstatus 0x0 0
fpiaddr 0x0 0x0
(gdb) set $fp0=1
Remote communication error. Target disconnected.: Connection reset by
peer.
With my sha1 debugging test case I get different results depending on
the cpu type:
/home/alex/lsrc/qemu.git/tests/guest-debug/run-test.py --gdb
/home/alex/src/tools/binutils-gdb.git/builds/all/install/bin/gdb --qemu
/home/alex/lsrc/qemu.git/builds/user.static/m68k-linux-user/qemu-m68k --qargs
"" --bin tests/tcg/m68k-linux-user/sha1 --test
/home/alex/lsrc/qemu.git/tests/tcg/multiarch/gdbstub/sha1.py
GNU gdb (GDB) 10.0.50.20200414-git
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Executed .gdbinit
Reading symbols from tests/tcg/m68k-linux-user/sha1...
Remote debugging using localhost:1234
warning: Register "fp0" has an unsupported size (96 bits)
warning: Register "fp1" has an unsupported size (96 bits)
warning: Register "fp2" has an unsupported size (96 bits)
warning: Register "fp3" has an unsupported size (96 bits)
warning: Register "fp4" has an unsupported size (96 bits)
warning: Register "fp5" has an unsupported size (96 bits)
warning: Register "fp6" has an unsupported size (96 bits)
warning: Register "fp7" has an unsupported size (96 bits)
Remote 'g' packet reply is too long (expected 148 bytes, got 180 bytes):
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000408009f000000000800003407fff0000ffffffffffffffff7fff0000ffffffffffffffff7fff0000ffffffffffffffff7fff0000ffffffffffffffff7fff0000ffffffffffffffff7fff0000ffffffffffffffff7fff0000ffffffffffffffff7fff0000ffffffffffffffff000000000000000000000000