[fpc-pascal] Bug in RTL for arm
Hi, Today I did an update via svn. When I compiled for arm (in the hope that the bug I encountered a while ago would have disappeared) I found a bug in rtl/linux/arm/sysnr.inc : Const syscall_nr_base = syscall_nr_base; I modified this to : Const syscall_nr_base = $90; which is similar to fpc 2.0.2. When I compiled this I got my ususal error : /home/koenraad/fpc-devel/fpc/compiler/ppcrossarm -Ur -XParm-linux- -Xc -Xr -Ur -Xs -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -FE. -FU/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux -darm -dRELEASE -Us -Sg system.pp /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s: Assembler messages: /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51368: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51376: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51383: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51390: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51398: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51406: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51414: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51422: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51430: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51438: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51446: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51454: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51462: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51470: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51478: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51624: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51632: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51640: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51648: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51655: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51662: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51669: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51676: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51683: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51690: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51697: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51704: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51711: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51718: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51725: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51732: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51739: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51746: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51753: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51760: Error: unrecognized symbol type "" /home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51767: Error: unrecognized symbol type "" threadvr.inc(30,25) Error: Error while assembling exitcode 1 threadvr.inc(30,25) Fatal: There were 2 errors compiling module, stopping Fatal: Compilation aborted make[5]: *** [system.ppu] Fout 1 make[5]: Leaving directory `/home/koenraad/fpc-devel/fpc/rtl/linux' make[4]: *** [linux_all] Fout 2 make[4]: Leaving directory `/home/koenraad/fpc-devel/fpc/rtl' make[3]: *** [rtl] Fout 2 make[3]: Leaving directory `/home/koenraad/fpc-devel/fpc/compiler' make[2]: *** [cycle] Fout 2 make[2]: Leaving directory `/home/koenraad/fpc-devel/fpc/compiler' make[1]: *** [compiler_cycle] Fout 2 make[1]: Leaving directory `/home/koenraad/fpc-devel/fpc' make: *** [build-stamp.arm-linux] Fout 2 Regards, Koenraad Lelong.
Re: [fpc-pascal] Internal error 200312122
Koenraad Lelong schreef: Peter Vreman schreef: Martin Schreiber schreef: On Sunday 05 February 2006 17.11, Koenraad Lelong wrote: ... Internalerror numbers are just unique numbers be using . They don't have any meaning. Quick intro for debugging this. - Build compiler with debug info: 'make cycle OPT=-gl' - Compile source with this new compiler in gdb: - gdb --args - (gdb) br INTERNALERROR - (gdb) dir - (gdb) r - Hit breakpoint - (gdb) bt - The backtrace will give you more info. Use 'fr ' to jump to a function in the callstack so you can watch the code and variables. OK, I tried this, but that's as far as I can get. Enclosed the output of the backtrace (first lines are the commandline I used). Anything I can do further ? Thanks, Koenraad Lelong. ... I tried fr for the last 20 frames : (gdb) fr 20 #20 0x080e04ed in PROC_UNIT () at pmodules.pas:1097 1097 loadunits; (gdb) fr 19 #19 0x080df58a in LOADUNITS () at pmodules.pas:621 621tppumodule(pu.u).loadppu; (gdb) fr 18 #18 0x080d6ef5 in TPPUMODULE__LOADPPU (this=0x404e6c74) at fppu.pas:1509 1509 compile(mainsource^); (gdb) fr 17 #17 0x0808f207 in COMPILE (FILENAME='/home/koenraad/msegui/msegui/lib/common/kernel/msebitmap.pas') at parser.pas:525 525 proc_unit; (gdb) fr 16 #16 0x080e06f0 in PROC_UNIT () at pmodules.pas:1184 1184 parse_implementation_uses; (gdb) fr 15 #15 0x080dfd25 in PARSE_IMPLEMENTATION_USES () at pmodules.pas:839 839 loadunits; (gdb) fr 14 #14 0x080df58a in LOADUNITS () at pmodules.pas:621 621tppumodule(pu.u).loadppu; (gdb) fr 13 #13 0x080d6df9 in TPPUMODULE__LOADPPU (this=0x41085734) at fppu.pas:1471 1471load_usedunits; (gdb) fr 12 #12 0x080d6853 in TPPUMODULE__LOAD_USEDUNITS (this=0x41085734) at fppu.pas:1244 1244 tppumodule(pu.u).loadppu; (gdb) fr 11 #11 0x080d6ef5 in TPPUMODULE__LOADPPU (this=0x40304744) at fppu.pas:1509 1509 compile(mainsource^); (gdb) fr 10 #10 0x0808f207 in COMPILE (FILENAME='/home/koenraad/msegui/msegui/lib/common/kernel/msegui.pas') at parser.pas:525 525 proc_unit; (gdb) fr 9 #9 0x080e0a5b in PROC_UNIT () at pmodules.pas:1302 1302 gen_intf_wrappers(codesegment,current_module.localsymtable); (gdb) fr 8 #8 0x0811d7c3 in GEN_INTF_WRAPPERS (LIST=0x411f3f34, ST=0x41401a54) at ncgutil.pas:2364 2364 gen_intf_wrapper(list,tobjectdef(def)); (gdb) fr 7 #7 0x0811d758 in GEN_INTF_WRAPPER (LIST=0x411f3f34, _CLASS=0x41641d54) at ncgutil.pas:2349 2349 cg.g_intf_wrapper(list,_class.implementedinterfaces.implprocs(i,j),tmps,_class.implementedinterfaces.ioffsets(i)); (gdb) fr 6 #6 0x0809cca5 in TCGARM__G_INTF_WRAPPER (LIST=0x411f3f34, PROCDEF=0x41685744, LABELNAME='WRPR_MSEGUI_TINTERNALAPPLICATION_$_IMOUSE_$_1_$_MSEGUI_TINTERNALAPPLICATION_$__GETMOUSEWINID$$LONGWORD', IOFFSET=373, this=0x40068014) at cgcpu.pas:1479 1479in cgcpu.pas (gdb) fr 5 #5 0x080ccfb3 in TCG__G_ADJUST_SELF_VALUE (LIST=0x411f3f34, PROCDEF=0x41685744, IOFFSET=373, this=0x40068014) at cgobj.pas:2001 2001 cg.a_op_const_reg(list,OP_SUB,paraloc.size,ioffset,paraloc.register); (gdb) fr 4 #4 0x0809a141 in TCGARM__A_OP_CONST_REG (LIST=0x411f3f34, OP=OP_SUB, SIZE=OS_32, A=373, REG=16777216, this=0x40068014) at cgcpu.pas:287 287 in cgcpu.pas (gdb) fr 3 #3 0x0809a297 in TCGARM__A_OP_CONST_REG_REG (LIST=0x411f3f34, OP=OP_SUB, SIZE=OS_32, A=373, SRC=16777216, DST=16777216, this=0x40068014) at cgcpu.pas:323 323 in cgcpu.pas (gdb) fr 3 #3 0x0809a297 in TCGARM__A_OP_CONST_REG_REG (LIST=0x411f3f34, OP=OP_SUB, SIZE=OS_32, A=373, SRC=16777216, DST=16777216, this=0x40068014) at cgcpu.pas:323 323 in cgcpu.pas (gdb) fr 2 #2 0x0809a6db in TCGARM__A_OP_CONST_REG_REG_CHECKOVERFLOW (LIST=0x411f3f34, OP=OP_SUB, SIZE=OS_32, A=373, SRC=16777216, DST=16777216, SETFLAGS=false, OVLOC= {LOC = LOC_VOID, SIZE = 166, RESFLAGS = 186, VALUE = 134759354, VALUE64 = 4713231088527885242, REFERENCE = {OFFSET = 134759354, SYMBOL = 0x4168c2b4, RELSYMBOL = 0x4168c2b4, SEGMENT = 1097666932, BASE = -2068527460, INDEX = 135726240, REFADDR = 60, SCALEFACTOR = 142, SYMBOLDATA = 0x809ff56, SIGNINDEX = 52, SHIFTIMM = 4, ADDRESSMODE = 9, SHIFTMODE = 8}, REGISTER = 134759354, REGISTER64 = {REGLO = 134759354, REGHI = 1097384628}}, this=0x40068014) at cgcpu.pas:435 435 in cgcpu.pas (gdb) fr 1 #1 0x080c926f in TCG__GETINTREGISTER (LIST=0x411f3f34, SIZE=OS_32, this=0x40068014) at cgobj.pas:548 548 internalerror(200312122); (gdb) fr 0 #0 INTERNALERROR (I=200312122) at verbose.pas:447 447 UpdateStatus; (gdb) Is there no-one who can give suggestions where to look next ? I want to help, but I don't know much about gdb, I don't know about the internals of fpc... Regards, Koenraad Lelong. ___ fpc-pascal mai