Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2006-12

fpc armeb nslu2 got a bit further with float probs on 2.0.5

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Terry Kemp

I have flashed the slug to SlugOS (still big endian) and got gdb on it. It appears that the issue is not so much the fpu or floating point but with the FloatStr, StrToFloat etc conversions which seem to get stuck in system.str.
I have tried to chase the system.str function but got lost in the {$i xxxx} includes and header files :(
Any hints on how to debug this further?

Terry

here is the session...
gdb ./floattst

dlopen failed on 'libthread_db.so.1' - libthread_db.so.1: cannot open shared object file: No such file or directory
GDB will not be able to debug pthreads.

GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "armeb-linux"...
(gdb) start
Breakpoint 1 at 0x813c: file floattst.pp, line 16. Starting program: /home/m50/floattst
main () at floattst.pp:16
16 b := 2.7;
(gdb) display a
1: A = 1.5
(gdb) display b
2: B = 0
(gdb) display c
3: C = 0
(gdb) display d
4: D = 0
(gdb) display s
5: S = (ANSISTRING) 0x0
(gdb) n
17 c := a * b;
5: S = (ANSISTRING) 0x0
4: D = 0
3: C = 0
2: B = 2.70000005
1: A = 1.5
(gdb) n
18 Str(Single(c):0:3, s);
5: S = (ANSISTRING) 0x0
4: D = 0
3: C = 4.05000019
2: B = 2.70000005
1: A = 1.5
(gdb) n

************* it goes full CPU usage here and hangs ****************

Program received signal SIGINT, Interrupt.
0x0000edac in SYSTEM_STR_REAL$LONGINT$LONGINT$DOUBLE$TREAL_TYPE $OPENSTRING ()
5: S = (ANSISTRING) 0x0
4: D = 0
3: C = 4.05000019
2: B = 2.70000005
1: A = 1.5
(gdb) n
Single stepping until exit from function SYSTEM_STR_REAL$LONGINT$LONGINT $DOUBLE$TREAL_TYPE$OPENSTRING,
which has no line number information.
n

Program received signal SIGINT, Interrupt.
0x0000ede0 in SYSTEM_STR_REAL$LONGINT$LONGINT$DOUBLE$TREAL_TYPE $OPENSTRING ()
5: S = (ANSISTRING) 0x0
4: D = 0
3: C = 4.05000019
2: B = 2.70000005
1: A = 1.5
(gdb) k
Kill the program being debugged? (y or n) y
(gdb) q

Reply by email