[fpc-pascal] arm big endian questions and info

Henry Vermaak henry.vermaak at gmail.com
Mon Mar 12 17:41:59 CET 2007


> > these results are (everything compiled with -CfSOFT for big endian):
> >
> > 1)  writeln('Hello World') outputs "Hello WorldHello W".  all other
> > writeln and readln calls seem to work after that.
> >
> > 2)  i get "Runtime error 207" when i attempt floating point operations.
>
> Try to get a stack trace please.
>

(gdb) s
Illegal update to pc in instruction
148     in arm.inc
(gdb) bt
#0  MOVE_PLD () at arm.inc:148
#1  $0002e410 in FPC_WRITEBUFFER () at text.inc:477
#2  $0002ea08 in fpc_write_text_pchar_as_array () at text.inc:568
#3  $00008264 in main () at armbetest.pas:15
(gdb) list
15        writeln('the quotient is ', s1/s2);
16      end.
(gdb)

source:
program hello;

{uses sysutils;}

var
  s1, s2: real;

begin
  writeln('hello there!');
  write('enter a dividend: ');
  readln(s1);
  write('enter a divisor: ');
  readln(s2);
{  writeln('the quotient is ' + format('%.2f', [s1/s2]));}
  writeln('the quotient is ', s1/s2);
end.

when i un-comment uses sysutils; i get:

(gdb) s
Single stepping until exit from function _start,
which has no line number information.

Program received signal SIGSEGV, Segmentation fault.
fpc_ansistr_decr_ref () at astrings.inc:100
100     astrings.inc: No such file or directory.
        in astrings.inc
(gdb) bt
#0  fpc_ansistr_decr_ref () at astrings.inc:100
#1  $0004c2b4 in FINALIZERESOURCETABLES () at objpas.pp:347
#2  $0004c36c in OBJPAS_finalize () at objpas.pp:515
#3  $00026c18 in FINALIZEUNITS () at system.inc:687
#4  $00026cb0 in INTERNALEXIT () at system.inc:723
#5  $00026edc in DO_EXIT () at system.inc:769
#6  $00026f04 in HALT () at system.inc:783
#7  $00026ffc in HANDLEERRORADDRFRAME () at system.inc:807
#8  $0002705c in HANDLEERRORFRAME () at system.inc:822
#9  $00027078 in HANDLEERROR () at system.inc:832
#10 $00029f7c in ALLOC_OSCHUNK () at heap.inc:813
#11 $0002a13c in SYSGETMEM_FIXED () at heap.inc:885
#12 $0002a344 in SYSGETMEM () at heap.inc:983
#13 $00028d78 in GETMEM (P=$0, SIZE=13) at heap.inc:241
#14 $000221a8 in TOBJECT__NEWINSTANCE () at objpas.inc:213
#15 $00046c3c in EXCEPTION__CREATE (MSG=$5a864) at sysutils.inc:116
#16 $000487cc in INITEXCEPTIONS () at sysutils.inc:363
#17 $0004b9a8 in SYSUTILS_init () at sysutils.pp:1062
#18 $00026b88 in fpc_initializeunits () at system.inc:668
#19 $0000812c in main () at armbetest.pas:8
(gdb) s

Program exited normally.
(gdb)

hope this is helpful.

henry



More information about the fpc-pascal mailing list