* ARM EABI: GDB internal error on printing out float (VFP math)
@ 2008-11-13 14:35 Sergei Poselenov
2008-11-13 14:51 ` Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Sergei Poselenov @ 2008-11-13 14:35 UTC (permalink / raw)
To: gdb
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ARM EABI: GDB internal error on printing out float (VFP math)
2008-11-13 14:35 ARM EABI: GDB internal error on printing out float (VFP math) Sergei Poselenov
@ 2008-11-13 14:51 ` Daniel Jacobowitz
2008-11-19 10:35 ` Sergei Poselenov
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2008-11-13 14:51 UTC (permalink / raw)
To: Sergei Poselenov; +Cc: gdb
On Thu, Nov 13, 2008 at 05:33:50PM +0300, Sergei Poselenov wrote:
> This GDB was configured as "arm-linux"...
GDB doesn't support VFP registers on this target, because the kernel
doesn't provide access to the necessary registers yet.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ARM EABI: GDB internal error on printing out float (VFP math)
2008-11-13 14:51 ` Daniel Jacobowitz
@ 2008-11-19 10:35 ` Sergei Poselenov
2008-11-19 13:31 ` Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Sergei Poselenov @ 2008-11-19 10:35 UTC (permalink / raw)
To: Sergei Poselenov, gdb
Hello Daniel,
Daniel Jacobowitz wrote:
> On Thu, Nov 13, 2008 at 05:33:50PM +0300, Sergei Poselenov wrote:
>> This GDB was configured as "arm-linux"...
>
> GDB doesn't support VFP registers on this target, because the kernel
> doesn't provide access to the necessary registers yet.
>
Thanks for the answer.
So, it turns out that GDB is unusable with VFP-enabled applications?
Do you happen to know any workarounds, or plans to fix this in ARM
kernel and in GDB?
Thanks again,
Sergei
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ARM EABI: GDB internal error on printing out float (VFP math)
2008-11-19 10:35 ` Sergei Poselenov
@ 2008-11-19 13:31 ` Daniel Jacobowitz
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2008-11-19 13:31 UTC (permalink / raw)
To: Sergei Poselenov; +Cc: gdb
On Wed, Nov 19, 2008 at 01:35:17PM +0300, Sergei Poselenov wrote:
> Thanks for the answer.
>
> So, it turns out that GDB is unusable with VFP-enabled applications?
I'm not sure about the error you got. I use GDB with VFP code all the
time, but I don't think I've ever seen that error.
> Do you happen to know any workarounds, or plans to fix this in ARM
> kernel and in GDB?
Yes, there are plans to fix this. I don't know when it will be ready,
though.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-11-19 13:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-13 14:35 ARM EABI: GDB internal error on printing out float (VFP math) Sergei Poselenov
2008-11-13 14:51 ` Daniel Jacobowitz
2008-11-19 10:35 ` Sergei Poselenov
2008-11-19 13:31 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox