Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-08 Thread Sergei Gorelkin
09.09.2014 9:53, Sven Barth пишет: On 08.09.2014 22:54, Michael Ring wrote: This smells like a problem I had on pic32. In my case the pic32 chips do not have a floating point unit and the processor creates an illegal instruction (or something similar) exception. I solved this for me by patching

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-08 Thread Reinier Olislagers
Applied a similar patch [1]; progress, thanks! gdb bt now shows: ^C Program received signal SIGINT, Interrupt. fpc_setjmp (S= {RA = 4398704, SP = 2139211400, S0 = 2130823600, S1 = 5034972, S2 = 5035028, S3 = 4571000, S4 = 2000557128, S5 = 4587520, S6 = 4589204, S7 = 5034940, FP = 2139211632,

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-08 Thread Sven Barth
On 08.09.2014 22:54, Michael Ring wrote: This smells like a problem I had on pic32. In my case the pic32 chips do not have a floating point unit and the processor creates an illegal instruction (or something similar) exception. I solved this for me by patching out the call to the hardware coproc

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-08 Thread Nikolai Zhubr
Hi, 09.09.2014 0:54, Sven Barth: [...] http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=28625 Since you're compiling with -CfSOFT this might be the solution. BTW, the kernel on the devel mips box ha

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-08 Thread Michael Ring
Sven, you were faster than me ,-) Michael Am 08.09.14 um 22:54 schrieb Sven Barth: Am 08.09.2014 20:26 schrieb "Reinier Olislagers" mailto:reinierolislag...@gmail.com>>: > > On 08/09/2014 20:05, Sven Barth wrote: > > Could you please recompile FPC with OPT="-gl" (maybe also -O-) and > > comp

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-08 Thread Michael Ring
This smells like a problem I had on pic32. In my case the pic32 chips do not have a floating point unit and the processor creates an illegal instruction (or something similar) exception. I solved this for me by patching out the call to the hardware coprocessor when softfpu is selected. You c

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-08 Thread Sven Barth
Am 08.09.2014 20:26 schrieb "Reinier Olislagers" < reinierolislag...@gmail.com>: > > On 08/09/2014 20:05, Sven Barth wrote: > > Could you please recompile FPC with OPT="-gl" (maybe also -O-) and > > compile your test program with that options as well and then retest the > > GDB run? > > Compiled cr

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-08 Thread Sven Barth
On 08.09.2014 20:25, Reinier Olislagers wrote: (gdb) bt #0 GET_FSR () at C:/development/fpctrunk/rtl/mips/mips.inc:21 #1 0x00401b5c in SYSINITFPU () at C:/development/fpctrunk/rtl/mips/mips.inc:61 #2 0x00401bd0 in FPC_CPUINIT () at C:/development/fpctrunk/rtl/mips/mips.inc:75 #3 0x00429b

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-08 Thread Reinier Olislagers
On 08/09/2014 20:05, Sven Barth wrote: > Could you please recompile FPC with OPT="-gl" (maybe also -O-) and > compile your test program with that options as well and then retest the > GDB run? Compiled cross-compiler: opt="-O- -gl" crossopt="-CpMIPS32R2 -CfSOFT" Compiled program: fpc -Tlinux -Pmi

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-08 Thread Sven Barth
Am 08.09.2014 18:28 schrieb "Reinier Olislagers" < reinierolislag...@gmail.com>: > > On 08/09/2014 18:01, Joost van der Sluis wrote: > > On 09/08/2014 10:25 AM, Reinier Olislagers wrote: > >> gdb ./hellomips > >> > >> > >> dlopen failed on 'libthread_db.so.1' - File not found > >> GDB will not be a

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-08 Thread Reinier Olislagers
On 08/09/2014 18:01, Joost van der Sluis wrote: > On 09/08/2014 10:25 AM, Reinier Olislagers wrote: >> gdb ./hellomips >> >> >> dlopen failed on 'libthread_db.so.1' - File not found >> GDB will not be able to debug pthreads. >> >> GNU gdb 6.8 >> Copyright (C) 2008 Free Software Foundation, Inc. >>

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-08 Thread Joost van der Sluis
On 09/08/2014 10:25 AM, Reinier Olislagers wrote: gdb ./hellomips dlopen failed on 'libthread_db.so.1' - File not found GDB will not be able to debug pthreads. GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-08 Thread Reinier Olislagers
On 07/09/2014 23:12, Nikolai Zhubr wrote: > 07.09.2014 15:50, Florian Klämpfl: >> Is gdb or strace available on this system? > > Yes. Both strace and gdb packages are available in openwrt (at least in > the latest official release), Yes, I've got both of them installed as well as binutils. strac