qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: m68k: gdbstub crashing setting float register on cfv4e cpu


From: Alex Bennée
Subject: Re: m68k: gdbstub crashing setting float register on cfv4e cpu
Date: Tue, 14 Apr 2020 17:56:44 +0100
User-agent: mu4e 1.3.10; emacs 28.0.50

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
  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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]