Sign in Join

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

Mailing lists / fpc-pascal / 2006-02

Internal error 200312122

9 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Koenraad Lelong

When I try to compile the MSEgui demo for arm (using fpc 2.0.2, MSEgui 0.7) I'm getting that error when compiling msegui.pas. Where should I look to solve this ?
I tried some shuffling in the uses-header (I found this in this list when I searched for internal errors), but this didn't work. I can provide more info (output of MSEgui, fpcdebug-file). B.T.W. I made a spec file to make an rpm for fpc 2.0.2. Anyone interested ? Of course you need a toolchain for arm. Regards,
Koenraad Lelong.

L505
to Koenraad Lelong
When I try to compile the MSEgui demo for arm (using fpc 2.0.2, MSEgui 0.7) I'm getting that error when compiling msegui.pas. Where should I look to solve this ?

Try to rebuild all units.
use the -Ba compiler option

I think I had this same issue when I tried MSEgui long ago, and it only occurred if I did not request -Ba option.

Koenraad Lelong
to L505
L505 wrote 12 lines
>When I try to compile the MSEgui demo for arm (using fpc 2.0.2, MSEgui >0.7) I'm getting that error when compiling msegui.pas. Where should I >look to solve this ? Try to rebuild all units. use the -Ba compiler option I think I had this same issue when I tried MSEgui long ago, and it only occurred if I did not request -Ba option.

Just tried it, doesn't work :-(. Compiling with ppc386 for i386-linux works fine, compiling with ppcrossarm for arm-linux gives the error. Could this be a processor specific error ?
Thanks anyway,
Koenraad Lelong.

Martin Schreiber
to Koenraad Lelong
Koenraad Lelong wrote
Just tried it, doesn't work :-(. Compiling with ppc386 for i386-linux works fine, compiling with ppcrossarm for arm-linux gives the error. Could this be a processor specific error ?

compiler/cgobj.pas:548:

    function tcg.getintregister(list:Taasmoutput;size:Tcgsize):Tregister;
      begin
        if not assigned(rg[R_INTREGISTER]) then
          internalerror(200312122);
        result:=rg[R_INTREGISTER].getregister(list,cgsize2subreg(size));
      end;

Martin

Koenraad Lelong
to Martin Schreiber
Martin Schreiber wrote 17 lines
On Sunday 05 February 2006 17.11, Koenraad Lelong wrote: >Just tried it, doesn't work :-(. Compiling with ppc386 for i386-linux >works fine, compiling with ppcrossarm for arm-linux gives the error. >Could this be a processor specific error ? compiler/cgobj.pas:548: function tcg.getintregister(list:Taasmoutput;size:Tcgsize):Tregister; begin if not assigned(rg[R_INTREGISTER]) then internalerror(200312122); result:=rg[R_INTREGISTER].getregister(list,cgsize2subreg(size)); end; Martin

OK, now I know that I can search for such an error. I assumed they were put together in the source (somestring1+somestring2...). I'm going to look at that (although with little hope, I'm not into compilers ;-)).
Thanks,
Koenraad Lelong.

Peter Vreman
to Koenraad Lelong
Show quoted text 24 lines
Martin Schreiber schreef: > On Sunday 05 February 2006 17.11, Koenraad Lelong wrote: > >>Just tried it, doesn't work :-(. Compiling with ppc386 for i386-linux >>works fine, compiling with ppcrossarm for arm-linux gives the error. >>Could this be a processor specific error ? > > > compiler/cgobj.pas:548: > > function > tcg.getintregister(list:Taasmoutput;size:Tcgsize):Tregister; > begin > if not assigned(rg[R_INTREGISTER]) then > internalerror(200312122); > result:=rg[R_INTREGISTER].getregister(list,cgsize2subreg(size)); > end; > > Martin OK, now I know that I can search for such an error. I assumed they were put together in the source (somestring1+somestring2...). I'm going to look at that (although with little hope, I'm not into compilers ;-)).

Internalerror numbers are just unique numbers be using <date><seqnr>. 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 <newcompiler> <args>
- (gdb) br INTERNALERROR
- (gdb) dir <pathtocompilersource>
- (gdb) r
- Hit breakpoint
- (gdb) bt
- The backtrace will give you more info. Use 'fr <framenr>' to jump to a function in the callstack so you can watch the code and variables.

Koenraad Lelong
to Peter Vreman
Peter Vreman wrote
>Martin Schreiber schreef: > >>On Sunday 05 February 2006 17.11, Koenraad Lelong wrote:

...

Show quoted text 16 lines
Internalerror numbers are just unique numbers be using <date><seqnr>. 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 <newcompiler> <args> - (gdb) br INTERNALERROR - (gdb) dir <pathtocompilersource> - (gdb) r - Hit breakpoint - (gdb) bt - The backtrace will give you more info. Use 'fr <framenr>' 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.

Koenraad Lelong
to Koenraad Lelong
Koenraad Lelong wrote 31 lines
Peter Vreman schreef: >> Martin Schreiber schreef: >> >>> On Sunday 05 February 2006 17.11, Koenraad Lelong wrote: ... > > Internalerror numbers are just unique numbers be using <date><seqnr>. > 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 <newcompiler> <args> > - (gdb) br INTERNALERROR > - (gdb) dir <pathtocompilersource> > - (gdb) r > - Hit breakpoint > - (gdb) bt > - The backtrace will give you more info. Use 'fr <framenr>' 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 <frame#> 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 621 tppumodule(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 621 tppumodule(pu.u).loadppu;
(gdb) fr 13
#13 0x080d6df9 in TPPUMODULE__LOADPPU (this=0x41085734) at fppu.pas:1471 1471 load_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
1479 in 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.

Peter Vreman
to Koenraad Lelong
Show quoted text 15 lines
#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);

Fixed