Re: [fpc-pascal] Runs correctly when debugging.

2012-05-04 Thread Henry Vermaak
On 4 May 2012 23:03, Henry Vermaak wrote: > On 4 May 2012 22:14, Guillermo Martínez Jiménez wrote: >> Hello everybody, >> >> I'm working on a wrapper of a C library.  I've found a bug, but I >> can't debug it with GDB because if I compile with "-g" and link with >> the debug version of the librar

Re: [fpc-pascal] Runs correctly when debugging.

2012-05-04 Thread Henry Vermaak
On 4 May 2012 22:14, Guillermo Martínez Jiménez wrote: > Hello everybody, > > I'm working on a wrapper of a C library.  I've found a bug, but I > can't debug it with GDB because if I compile with "-g" and link with > the debug version of the library it works correctly. > > But if I compile with "-

[fpc-pascal] Runs correctly when debugging.

2012-05-04 Thread Guillermo Martínez Jiménez
Hello everybody, I'm working on a wrapper of a C library. I've found a bug, but I can't debug it with GDB because if I compile with "-g" and link with the debug version of the library it works correctly. But if I compile with "-g" and link with the release version of the library, I can't debug i

Re: [fpc-pascal] InstantFPC and argv

2012-05-04 Thread Mattias Gaertner
On Fri, 04 May 2012 17:22:16 +0200 dhkblas...@zeelandnet.nl wrote: > > > I'm creating a script to be executed by instantfpc when I noticed > that paramstr(0) does not reflect the location of the script but the > location of the cached executable. Is there a way to alter this location > program

Re: [fpc-pascal] InstantFPC and argv

2012-05-04 Thread Marco van de Voort
In our previous episode, Tomas Hajny said: > 1) Find the first alphabetic character after the first line (which is > already processed/skipped by InstantFPC anyway) while ignoring all > whitespaces and possible comments (in all allowed formats, i.e. including > (* *) ) - the only small complexity h

Re: [fpc-pascal] InstantFPC and argv

2012-05-04 Thread Tomas Hajny
On Fri, May 4, 2012 18:44, Darius Blaszyk wrote: > On May 4, 2012, at 6:12 PM, Tomas Hajny wrote: >> On Fri, May 4, 2012 17:44, dhkblas...@zeelandnet.nl wrote: >>> On 4 mei '12, michael.vancann...@wisa.be wrote: On Fri, 4 May >>> 2012, michael.vancann...@wisa.be [3]wrote: > On Fri, 4

Re: [fpc-pascal] InstantFPC and argv

2012-05-04 Thread Darius Blaszyk
On May 4, 2012, at 6:12 PM, Tomas Hajny wrote: > On Fri, May 4, 2012 17:44, dhkblas...@zeelandnet.nl wrote: >> On 4 mei '12, michael.vancann...@wisa.be wrote: >>> On Fri, 4 May >> 2012, michael.vancann...@wisa.be [3]wrote: >>> On Fri, 4 May 2012, >> dhkblas...@zeelandnet.nl [1]wrote:

Re: [fpc-pascal] InstantFPC and argv

2012-05-04 Thread Tomas Hajny
On Fri, May 4, 2012 17:44, dhkblas...@zeelandnet.nl wrote: > On 4 mei '12, michael.vancann...@wisa.be wrote: >> On Fri, 4 May > 2012, michael.vancann...@wisa.be [3]wrote: >> >>> On Fri, 4 May 2012, > dhkblas...@zeelandnet.nl [1]wrote: >>> I'm creating a script to be > executed by instantfpc wh

Re: [fpc-pascal] InstantFPC and argv

2012-05-04 Thread dhkblaszyk
On 4 mei '12, michael.vancann...@wisa.be wrote: > On Fri, 4 May 2012, michael.vancann...@wisa.be [3]wrote: > >> On Fri, 4 May 2012, dhkblas...@zeelandnet.nl [1]wrote: >> >>> I'm creating a script to be executed by instantfpc when I noticed that paramstr(0) does not reflect the location of

Re: [fpc-pascal] InstantFPC and argv

2012-05-04 Thread michael . vancanneyt
On Fri, 4 May 2012, michael.vancann...@wisa.be wrote: On Fri, 4 May 2012, dhkblas...@zeelandnet.nl wrote: I'm creating a script to be executed by instantfpc when I noticed that paramstr(0) does not reflect the location of the script but the location of the cached executable. Is there a w

Re: [fpc-pascal] InstantFPC and argv

2012-05-04 Thread michael . vancanneyt
On Fri, 4 May 2012, dhkblas...@zeelandnet.nl wrote: I'm creating a script to be executed by instantfpc when I noticed that paramstr(0) does not reflect the location of the script but the location of the cached executable. Is there a way to alter this location programatically to the script lo

[fpc-pascal] InstantFPC and argv

2012-05-04 Thread dhkblaszyk
I'm creating a script to be executed by instantfpc when I noticed that paramstr(0) does not reflect the location of the script but the location of the cached executable. Is there a way to alter this location programatically to the script location? Is there an alternative way? Regards, Darius

Re: RE : RE : [fpc-pascal] Reversing bit-order of byte

2012-05-04 Thread Koenraad Lelong
On 04-05-12 14:31, Thomas Schatzl wrote: It might be good to compile with -Cparmv6 (or -Cparmv7, do not know what type the processor you use is), this generates a "better" return instruction ("bx lr") - and for the rbit instruction you need armv6 already. Wouldn't it be possible to do r

Re: RE : RE : [fpc-pascal] Reversing bit-order of byte

2012-05-04 Thread Thomas Schatzl
Hi, On Fri, 2012-05-04 at 14:14 +0200, Koenraad Lelong wrote: > On 03-05-12 13:27, Thomas Schatzl wrote: > ... > > function reverse(b : byte) : byte; assembler; nostackframe; > > asm > >.long 0xe6ff0f30 // rbit r0, r0 > >lsr r0, r0, #23 > > end; > > > > Hi, > > I've been looking a bit fu

Re: RE : RE : [fpc-pascal] Reversing bit-order of byte

2012-05-04 Thread Koenraad Lelong
On 03-05-12 13:27, Thomas Schatzl wrote: ... function reverse(b : byte) : byte; assembler; nostackframe; asm .long 0xe6ff0f30 // rbit r0, r0 lsr r0, r0, #23 end; Hi, I've been looking a bit further at this. I disassembled the code and this is the result : 8000150: e6ff0f30