[fpc-pascal]No line numbers shown when Format raises an exception, compiled with -gl
Recently, I have been caught a couple of times by mistakes in my programs using Format (from SysUtils). When the format string and the supplied arguments do not match, Format raises an exception. This is nice, but unfortunately, only a hexadecimal address is printed when the exception is not caught (my programs do not catch this exception). All the pieces of these programs have been compiled with -gl under Linux on i386 with 1.0.10 (actually with ppc386 -vwn -gl -O2 -Sd -Ci -Cr -Co -Ct). It is a small disaster to find out which Format call is in error, if you have many of them. How can one get line numbers on the uncaught exception? Shouldn't a normal backtrace be generated, including line numbers? Here is a small program and its response: [EMAIL PROTECTED](228) cat formatexception.pp program FormatException; uses SysUtils; { for Format } begin writeln ( Format ( '%S', [ 1 ] ) ) { 1 is not a string --> ECONVERTERROR } end. [EMAIL PROTECTED](229) ppc386 -gl -Sd formatexception.pp Free Pascal Compiler version 1.0.10 [2003/06/26] for i386 Copyright (c) 1993-2003 by Florian Klaempfl Target OS: Linux for i386 Compiling formatexception.pp Assembling formatexception Linking formatexception 7 Lines compiled, 0.3 sec [EMAIL PROTECTED](230) ./formatexception An unhandled exception occurred at 0x0805093B : ECONVERTERROR : Invalid argument index in format "" 0x0805093B Thanks, Tom ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]Error Compiling Examples with 1.9.2 (Stupid Newbie Question)
> I was trying to compile the sqlite example with the new 1.9.2 version of > FPC and got the following error. Don't know exactly what it means. I > am running Gentoo Linux on a AMD Athlon and installed FPC 1.9.2 using > the beta release. Lazarus compiles fine. Do not compile files in build directories, and don't include build directories in your search path. The missing opcodes are powerpc opcodes. Do you have a custom defines set ? ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]Error Compiling Examples with 1.9.2 (Stupid Newbie Question)
On Thu, 2004-01-22 at 05:17, Marco van de Voort wrote: > > I was trying to compile the sqlite example with the new 1.9.2 version of > > FPC and got the following error. Don't know exactly what it means. I > > am running Gentoo Linux on a AMD Athlon and installed FPC 1.9.2 using > > the beta release. Lazarus compiles fine. > Do not compile files in build directories, and don't include build > directories in your search path. Sorry, could you explain this one? I did make where the source and makefile was; in the /usr/local/src/packages/base/sqlite . Is there a way to invoke it elsewhere? I added -Fi/usr/local/src/fpc-1.9.2/rtl/* to the searchpath in fpc.cfg so it wouldnt complain about finding sysunixh.inc > The missing opcodes are powerpc opcodes. Do you have a custom defines > set ? I did not intentionally set any defines. Like I said Lazarus is compiling fine. Where would I find these? ___ > fpc-pascal maillist - [EMAIL PROTECTED] > http://lists.freepascal.org/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]Error Compiling Examples with 1.9.2 (Stupid Newbie Question)
> On Thu, 2004-01-22 at 05:17, Marco van de Voort wrote: > > > I was trying to compile the sqlite example with the new 1.9.2 version of > > > FPC and got the following error. Don't know exactly what it means. I > > > am running Gentoo Linux on a AMD Athlon and installed FPC 1.9.2 using > > > the beta release. Lazarus compiles fine. > > > Do not compile files in build directories, and don't include build > > directories in your search path. > > Sorry, could you explain this one? I did make where the source and > makefile was; in the /usr/local/src/packages/base/sqlite . Is there a > way to invoke it elsewhere? > I added -Fi/usr/local/src/fpc-1.9.2/rtl/* to the searchpath in fpc.cfg > so it wouldnt complain about finding sysunixh.inc It should remake the rtl at all. Simples maybe is to temporarily rename /usr/local/src/fpc-1.9.2/rtl/ to .../rtl2 The FPC makefiles actively search for the RTL root directory when compiling in the tree, and some change in defines or dates might cause them to recompile. You can guard against this by compiling your snapshot with RELEASE=1, which adds a parameter to the buildprocess that signals "never rebuild this" (parameter -Ur) ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal]Error Compiling Examples with 1.9.2 (Stupid Newbie Question)
>> On Thu, 2004-01-22 at 05:17, Marco van de Voort wrote: >> > > I was trying to compile the sqlite example with the new 1.9.2 version of >> > > FPC and got the following error. Don't know exactly what it means. I >> > > am running Gentoo Linux on a AMD Athlon and installed FPC 1.9.2 using >> > > the beta release. Lazarus compiles fine. >> >> > Do not compile files in build directories, and don't include build >> > directories in your search path. >> >> Sorry, could you explain this one? I did make where the source and >> makefile was; in the /usr/local/src/packages/base/sqlite . Is there a >> way to invoke it elsewhere? >> I added -Fi/usr/local/src/fpc-1.9.2/rtl/* to the searchpath in fpc.cfg >> so it wouldnt complain about finding sysunixh.inc >It should remake the rtl at all. Simples maybe is to temporarily rename >/usr/local/src/fpc-1.9.2/rtl/ to .../rtl2 >The FPC makefiles actively search for the RTL root directory when compiling >in the tree, and some change in defines or dates might cause them to >recompile. >You can guard against this by compiling your snapshot with RELEASE=1, which >adds a parameter to the buildprocess that signals "never rebuild this" (parameter -Ur) I will try that tonight, however, my problem began when it wanted to use the sysunixh.inc file for some reason... thats when i added the path to the rtl in the src directory.. If I change the name to rtl2 won't it err out on not finding sysunixh.inc? I installed fpc 1.9.2 from the beta2 install... this seems to be the problem.. i didnt actually compile fpc. maybe i should pull it from cvs and do a make cycle. Matt Henley (This is my work address, please respond to [EMAIL PROTECTED]) ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal