Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Sergei Poselenov <sposelenov@emcraft.com>
To: gdb@sources.redhat.com
Subject: ARM EABI: GDB internal error on printing out float (VFP math)
Date: Thu, 13 Nov 2008 14:35:00 -0000	[thread overview]
Message-ID: <491C3ACE.2050201@emcraft.com> (raw)

Hello all,

I've ran into this running the GDB testsuite, store.exp.

-bash-3.2# gdb store
GNU gdb Red Hat Linux (6.7-1rh)
Copyright (C) 2007 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 "arm-linux"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) b wack_float
Breakpoint 1 at 0x837c: file /opt/eldk42armFP/armFP/tmp/store.c, line 11.
(gdb) r
Starting program: /tmp/store

Breakpoint 1, wack_float (u=-1, v=-2) at 
/opt/eldk42armFP/armFP/tmp/store.c:11
11        register float l = u, r = v;
(gdb) n
12        l = add_float (l, r);
(gdb) p r
../../gdb/regcache.c:178: internal-error: register_size: Assertion 
`regnum >= 0 && regnum < (gdbarch_num_regs (current_gdbarch) + 
gdbarch_num_pseudo_regs (current_gdbarch))' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)


Here is the reduced testcase:
float
add_float (register float u, register float v)
{
   return u + v;
}

float
wack_float (register float u, register float v)
{
   register float l = u, r = v;
   l = add_float (l, r);
   return l + r;
}

int
main ()
{
   wack_float (-1, -2);
   return 0;
}


The test was built as follows:
arm-linux-gcc -o store -g store.c -mfpu=vfp -mfloat-abi=softfp

arm-linux-gcc -v
Reading specs from 
/opt/eldk-4.2-arm-2008-10-21/usr/bin/../lib/gcc/arm-linux-gnueabi/4.2.2/specs
Target: arm-linux-gnueabi
Configured with: 
/work/psl/eldk-builds/arm-2008-10-21/work/usr/src/denx/BUILD/crosstool-0.43/build/gcc-4.2.2-glibc-20070515T2025-eldk/arm-linux-gnueabi/gcc-4.2.2/configure 
--target=arm-linux-gnueabi --host=i686-host_pc-linux-gnu 
--prefix=/var/tmp/eldk.F0dvjm/usr/crosstool/gcc-4.2.2-glibc-20070515T2025-eldk/arm-linux-gnueabi 
--disable-hosted-libstdcxx 
--with-headers=/var/tmp/eldk.F0dvjm/usr/crosstool/gcc-4.2.2-glibc-20070515T2025-eldk/arm-linux-gnueabi/arm-linux-gnueabi/include 
--with-local-prefix=/var/tmp/eldk.F0dvjm/usr/crosstool/gcc-4.2.2-glibc-20070515T2025-eldk/arm-linux-gnueabi/arm-linux-gnueabi 
--disable-nls --enable-threads=posix --enable-symvers=gnu 
--enable-__cxa_atexit --enable-languages=c,c++,java --enable-shared 
--enable-c99 --enable-long-long --without-x
Thread model: posix
gcc version 4.2.2

The problem reproduced with GDB 6.8-release, as well.

Thanks for any help,
Sergei


             reply	other threads:[~2008-11-13 14:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-13 14:35 Sergei Poselenov [this message]
2008-11-13 14:51 ` Daniel Jacobowitz
2008-11-19 10:35   ` Sergei Poselenov
2008-11-19 13:31     ` Daniel Jacobowitz

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=491C3ACE.2050201@emcraft.com \
    --to=sposelenov@emcraft.com \
    --cc=gdb@sources.redhat.com \
    /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