From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Thomas Huth <huth@tuxfamily.org>,
Laurent Vivier <laurent@vivier.eu>,
"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>
Subject: Re: m68k: gdbstub crashing setting float register on cfv4e cpu
Date: Tue, 14 Apr 2020 17:56:44 +0100 [thread overview]
Message-ID: <87sgh680qb.fsf@linaro.org> (raw)
In-Reply-To: <3be54f78-cf6d-af3b-6e1f-e91d146c6a3a@amsat.org>
Philippe Mathieu-Daudé <f4bug@amsat.org> 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
ATTACHED: m68k
GDB Exception: <class 'gdb.error'>
All tests complete: 1 failures
SHA1=15dd99a1991e0b3826fede3deffc1feba42278e6
And with:
/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 "-cpu cfv4e" --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
0x80000340 in _start ()
ATTACHED: m68k
Breakpoint 1 at 0x80001dda: file /home/alex/lsrc/qemu.git/tests/tcg/multiarch/sha1.c, line 137.
Program received signal SIGILL, Illegal instruction.
0x80019b70 in _dl_aux_init ()
FAIL: break @ 0x80019b70 <_dl_aux_init+4> ({void (SHA1_CTX *)} 0x80001dd6 <SHA1Init> 0 hits)
Single stepping until exit from function _dl_aux_init,
which has no line number information.
Program terminated with signal SIGILL, Illegal instruction.
The program no longer exists.
GDB Exception: <class 'gdb.error'>
All tests complete: 2 failures
qemu: uncaught target signal 4 (Illegal instruction) - core dumped
--
Alex Bennée
next prev parent reply other threads:[~2020-04-14 16:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-14 16:31 m68k: gdbstub crashing setting float register on cfv4e cpu Philippe Mathieu-Daudé
2020-04-14 16:56 ` Alex Bennée [this message]
2020-04-16 11:18 ` Laurent Vivier
2020-04-16 20:03 ` Pierre Muller
2020-04-16 20:09 ` Laurent Vivier
2020-04-16 20:37 ` Pierre Muller
2020-04-20 13:53 ` KONRAD Frederic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sgh680qb.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=f4bug@amsat.org \
--cc=huth@tuxfamily.org \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).