Re: [fpc-devel] [Fwd: Re: [Lazarusdev] FPDoc links to RTL, FCL]
On Tue, 2 Sep 2008, Vincent Snijders wrote: Vincent Snijders schreef: Michael Van Canneyt schreef: If you want the protected methods anywhere soon, I suggest you create a lazarus copy of the HTML docs with the options that you want. Does make rtl.chk support that by passing something like NOHIDEPROTECTED=1 to the make command? Currently not, but we can add something like it. Patches most welcome. See attached patch. Unfortunately fpdoc from trunk crashes when creating the fcl docs. Can you try to reproduce it? I used the following command line (without wrapping): make fcl.chk FPCSRCDIR=/home/vsds/src/fpc/2.3 FPDOC=/home/vsds/fpc/bin/fpdoc FPDOCOPTS=--footer=/home/vsds/src/lazsource/docs/html/sourceforgefooter.xml HIDEPROTECTED=NO The last lines of output, including backtrace: No documentation node found for identifier : #fcl.CustApp.TCustomApplication.DoRun No documenAn unhandled exception occurred at $0809121F : EAccessViolation : Access violation $0809121F TDOMELEMENT__GETATTRIBUTE, line 2075 of src/dom.pp $080AC7A5 SCANMODULE, line 563 of dw_html.pp $080AC330 THTMLWRITER__CREATE, line 627 of dw_html.pp tation node found for identifier : #fcl.CustApp.TCustomApplication.GetParams No documentation node found for identifier : #fcl.CustApp.TCustomApplication.GetParamCount $08049583 CREATEDOCUMENTATION, line 260 of fpdoc.pp $080499A3 main, line 290 of fpdoc.pp Works fine here (without the extra options). Michael. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] [Fwd: Re: [Lazarusdev] FPDoc links to RTL, FCL]
Michael Van Canneyt schreef: On Tue, 2 Sep 2008, Vincent Snijders wrote: Vincent Snijders schreef: Michael Van Canneyt schreef: If you want the protected methods anywhere soon, I suggest you create a lazarus copy of the HTML docs with the options that you want. Does make rtl.chk support that by passing something like NOHIDEPROTECTED=1 to the make command? Currently not, but we can add something like it. Patches most welcome. See attached patch. Unfortunately fpdoc from trunk crashes when creating the fcl docs. Can you try to reproduce it? I used the following command line (without wrapping): make fcl.chk FPCSRCDIR=/home/vsds/src/fpc/2.3 FPDOC=/home/vsds/fpc/bin/fpdoc FPDOCOPTS=--footer=/home/vsds/src/lazsource/docs/html/sourceforgefooter.xml HIDEPROTECTED=NO You removed the --hide-protected too? It works with hideprotected. Did you test with HIDEPROTECTED=NO. Vincent ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Re: FPC unit symbol checksum woes
While compiling a large Macintosh Pascal project with FPC, I am running into a number of problems, which I suspect are related: 1. After a clean, the full build succeeds 2. Ater a successive build (without a clean or source changes) several units are recompiled, until the compiler crashes 3. After another build, the compiler (sometimes) endlessly keeps compiling a selected number of units. So far the facts, the rest is what I am concluding and guessing, based on the above: - there seems to be a unit symbol checksum calculation problem, which is causing unneeded recompilations. - the checksum problem may also produce the crash, or at least trigger some unusual state in the compiler that wasn't foreseen in the code and then leads to the crash - I get the impression that the checksum problem is related to the order of used units in unit interface and/or implementation USES clauses - this may (or may not) be related to mixing macpascal and delphi modes (the project is a mix from an old CodeWarrior version and the PC Delphi version) - this may (or may not) be related to using (or even redefining) types that are different in macpascal and delphi modes, like INTEGER or STRING (any advice I give on coding habits is ignored) - this may (or may not) be related to using delphi mode declared objects from macpascal mode and the other way round. I don't have a simple reproducible case. I welcome advice on how to get there, based on above observations. These kind of recompile failures are a known issue. Years ago it is already identifed and an idea how to rewrite the unit handling. But it is a huge project and time is very limited. You can try to compile the compile with -dINTFPPU this will generate a .ppu.intf after the interface seciton has been parsed. Diffing the ppudump between the .ppu and .ppu.intf will give a better indication what is changed in the ppu between the interface parsing and implementation parsing. For the rest we can't help without having complete sources to reproduce. A single gdb backtrace doesn't help in this case. It shows only a result of a bug and not the real location where it goes wrong. Peter ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] [Fwd: Re: [Lazarusdev] FPDoc links to RTL, FCL]
On Wed, 3 Sep 2008, Vincent Snijders wrote: Michael Van Canneyt schreef: On Tue, 2 Sep 2008, Vincent Snijders wrote: Vincent Snijders schreef: Michael Van Canneyt schreef: If you want the protected methods anywhere soon, I suggest you create a lazarus copy of the HTML docs with the options that you want. Does make rtl.chk support that by passing something like NOHIDEPROTECTED=1 to the make command? Currently not, but we can add something like it. Patches most welcome. See attached patch. Unfortunately fpdoc from trunk crashes when creating the fcl docs. Can you try to reproduce it? I used the following command line (without wrapping): make fcl.chk FPCSRCDIR=/home/vsds/src/fpc/2.3 FPDOC=/home/vsds/fpc/bin/fpdoc FPDOCOPTS=--footer=/home/vsds/src/lazsource/docs/html/sourceforgefooter.xml HIDEPROTECTED=NO You removed the --hide-protected too? It works with hideprotected. Did you test with HIDEPROTECTED=NO. Works fine. Michael. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] generated assembler
Hi, I know it's possible, but I can't remember the exact FPC parameters. How do I see the assembler generated by FPC for my source code? I need to do some optimisation comparisons looking at the assembler generated. eg: Is assembler code generated for a call to a blank (no content) procedure? The content of the procedure might be IFDEF'd out. Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] generated assembler
Graeme Geldenhuys wrote: Hi, I know it's possible, but I can't remember the exact FPC parameters. How do I see the assembler generated by FPC for my source code? Read ppc386 -h. Micha ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Re: FPC unit symbol checksum woes
Peter Vreman wrote: These kind of recompile failures are a known issue. Years ago it is already identifed and an idea how to rewrite the unit handling. But it is a huge project and time is very limited. You can try to compile the compile with -dINTFPPU this will generate a .ppu.intf after the interface seciton has been parsed. Diffing the ppudump between the .ppu and .ppu.intf will give a better indication what is changed in the ppu between the interface parsing and implementation parsing. Thanks for the hint. I managed to rebuild the compiler with -dINTFPPU and this does produce .ppu.intf files when compiling with it. The diff between the ppudump of the the .ppu files and the .ppu.intf files does show checksum and other differences. Not sure which ones to look at. For example: @@ -1,20 +1,21 @@ -Analyzing Objects/DrumStyles.ppu.intf (v91) +Analyzing Objects/DrumStyles.ppu (v91) Header --- Compiler version: 2.3.1 Target processor: i386 Target operating system : Darwin-i386 -Unit flags : little_endian -FileSize (w/o header) : 31358 -Checksum: F4F82F2E -Interface Checksum : 7FE18E88 -Definitions stored : 0 -Symbols stored : 0 +Unit flags : static_linked, little_endian, local_threadvars, local_symtable +FileSize (w/o header) : 81958 +Checksum: BFD83432 +Interface Checksum : 86AA546F +Definitions stored : 1096 +Symbols stored : 1428 Interface section -- Module Name: DrumStyles +Source file 1 : DrumStyles.pas 2008/08/29 23:22:46 Uses unit: System (Crc: 286B12B3, IntfcCrc: E9DCB7B9) Uses unit: MacPas (Crc: F374769E, IntfcCrc: 72C6383A) Uses unit: MacOSAll (Crc: A4E5FD79, IntfcCrc: A2FF6F65) @@ -64,11 +65,16 @@ Uses unit: Hints (Crc: DB360E5E, IntfcCrc: 55A8384F) Uses unit: MBFiles (Crc: AC9F8454, IntfcCrc: 72616F2F) Uses unit: Classes (Crc: 42E7F73E, IntfcCrc: E050CFF2) -DerefMapsize: 3 +Link unit object file: DrumStyles.o (static ) +!! Skipping unsupported PPU Entry in General Part: 100 +!! Skipping unsupported PPU Entry in General Part: 82 +DerefMapsize: 5 DerefMap[0] = SYSTEM DerefMap[1] = MACOSALL DerefMap[2] = CLASSES -Derefdata length: 4785 +DerefMap[3] = MGLOBALS +DerefMap[4] = SYSUTILS +Derefdata length: 28828 Interface definitions -- @@ -86,9 +92,10 @@ Level : 2 Class : (24) Nil Procsym : (26) SymId 57 - File Pos : 1 (94,10) + File Pos : 1 (3411,10) SymOptions : Public Import Nr : 0 + Alias names : _DRUMSTYLES_READDRUMSTYLE$SHORTSTRING$$BOOLEAN -- parast -- -- parast -- Symtable datasize : 1 @@ -98,18 +105,18 @@ File Pos : 1 (94,24) SymOptions : Public Spez : Value - Regable : IntReg - Addr Taken : FALSE + Regable : Addr + Addr Taken : TRUE Var Type : (13) Unit 0, DefId 19 Options : HasLocalCopy DefaultConst : (22) Nil ParaNr : 10 - VarState : 2 + VarState : 3 ** Definition Id 1 ** Record definition Type symbol : (32) SymId 59 DefOptions : -DefStates : +DefStates : InitTable Used, RTTITable Used, InitTable Written, RTTITable Written FieldAlign : 0 RecordAlign : 4 PadAlign : 4 @@ -204,7 +211,7 @@ Record definition Type symbol : (134) SymId 73 DefOptions : -DefStates : +DefStates : InitTable Used, RTTITable Used, InitTable Written, RTTITable Written FieldAlign : 0 RecordAlign : 4 PadAlign : 4 etcetera. For the rest we can't help without having complete sources to reproduce. A single gdb backtrace doesn't help in this case. It shows only a result of a bug and not the real location where it goes wrong. I can put the ppudump files somewhere, or try something else at your advice or send you the complete source code by private email. Whatever you prefer. Regards, Adriaan van Os ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] generated assembler
On 9/3/08, Micha Nelissen [EMAIL PROTECTED] wrote: Read ppc386 -h. OK, I meant to say, I already looked at the parameter help, I'm just not sure which one I need to use. I would guess -al is what I am looking for? Is there more information on what all these options do? Sorry, my assembler is rusty! -a The compiler doesn't delete the generated assembler file -alList sourcecode lines in assembler file -anList node info in assembler file -apUse pipes instead of creating temporary assembler files -arList register allocation/release info in assembler file -atList temp allocation/release info in assembler file PS: Sorry, I only realized now, that I posted this thread in the fpc-devel mailing list. I meant for it to go to fpc-pascal. Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] generated assembler
On Wed, 3 Sep 2008, Graeme Geldenhuys wrote: On 9/3/08, Micha Nelissen [EMAIL PROTECTED] wrote: Read ppc386 -h. OK, I meant to say, I already looked at the parameter help, I'm just not sure which one I need to use. I would guess -al is what I am looking for? Is there more information on what all these options do? Sorry, my assembler is rusty! -a The compiler doesn't delete the generated assembler file -alList sourcecode lines in assembler file -al : This is the one you need. Michael. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Re: FPC unit symbol checksum woes
Adriaan van Os schrieb: Interface definitions -- @@ -86,9 +92,10 @@ Level : 2 Class : (24) Nil Procsym : (26) SymId 57 - File Pos : 1 (94,10) + File Pos : 1 (3411,10) For the record, File Pos changes and is crc'ed. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] generated assembler
On Wednesday 03 September 2008 11.07:49 Graeme Geldenhuys wrote: Hi, I know it's possible, but I can't remember the exact FPC parameters. How do I see the assembler generated by FPC for my source code? I need to do some optimisation comparisons looking at the assembler generated. eg: Is assembler code generated for a call to a blank (no content) procedure? The content of the procedure might be IFDEF'd out. You could use breakpoints and the (dis-)assembler window of MSEide, it lists mixed pascal and machine code. The SVN trunk version has some improvements in (dis-)assembler window, for example the possibility to set breakpoints on machine instructions. Martin ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] generated assembler
On 9/3/08, Martin Schreiber [EMAIL PROTECTED] wrote: You could use breakpoints and the (dis-)assembler window of MSEide, it lists mixed pascal and machine code. Thanks Martin, I'll take a look. What I'm trying to find out (with my rusty assembler knowledge) is if a lot of IFDEF's around procedure calls, compared to only one IFDEF inside a procedure would make a difference in performance and the code generated. I would prefer example 2 (it looks cleaner and would be less work), and from my quick/crude analysis, it seems both options generate pretty much the same code if the gDEBUG define is disabled (does NOT exist). Example #1... procedure Log(AParam1: string); begin writeln('LOG: ' + AParam1); end; var i, j: integer; s: string; begin {$IFDEF gDEBUG} Log('Starting...'); {$ENDIF} s := '%d + %d = %d'; i := 5; j := 2; {$IFDEF gDEBUG} Log('calculating result'); {$ENDIF} {$IFDEF gDEBUG} Log(Format(s, [i, j, i+j])); {$ENDIF} {$IFDEF gDEBUG} Log('Done.'); {$ENDIF} end. versus Example #2... procedure Log(AParam1: string); begin {$IFDEF gDEBUG} writeln('LOG: ' + AParam1); {$ENDIF} end; var i, j: integer; s: string; begin Log('Starting...'); s := '%d + %d = %d'; i := 5; j := 2; Log('calculating result'); Log(Format(s, [i, j, i+j])); Log('Done.'); end. Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Re: FPC unit symbol checksum woes
Florian Klaempfl wrote: Adriaan van Os schrieb: Interface definitions -- @@ -86,9 +92,10 @@ Level : 2 Class : (24) Nil Procsym : (26) SymId 57 - File Pos : 1 (94,10) + File Pos : 1 (3411,10) Are you sure ? For example, in the ppudump of the .ppu.intf file, we find the FilePos of the procedure declaration in the interface section Interface definitions -- ** Definition Id 0 ** Procedure definition Type symbol : (0) Nil DefOptions : DefStates : Return type : (4) Unit 0, DefId 3 Fpu used : 0 TypeOption : Procedure CallOption : MWPascal Options : Global Number : 65535 Level : 2 Class : (13) Nil Procsym : (15) SymId 33 File Pos : 1 (17,11) SymOptions : Public Import Nr : 0 -- parast -- -- parast -- Symtable datasize : 0 Symtable alignment: 0 whereas in the ppudump of the .ppu file, we read the FilePos of the same procedure in the implementation section Interface definitions -- ** Definition Id 0 ** Procedure definition Type symbol : (0) Nil DefOptions : DefStates : Return type : (4) Unit 0, DefId 3 Fpu used : 0 TypeOption : Procedure CallOption : MWPascal Options : Global Number : 65535 Level : 2 Class : (13) Nil Procsym : (15) SymId 33 File Pos : 1 (20,11) SymOptions : Public Import Nr : 0 Alias names : _AZK_ALLASSIGNZMELEZ -- parast -- -- parast -- Symtable datasize : 0 Symtable alignment: 0 procedure AllAssignZMELEZ; implementation procedure AllAssignZMELEZ; . For this unit, the checksums do match. Header --- Compiler version: 2.3.1 Target processor: i386 Target operating system : Darwin-i386 Unit flags : little_endian FileSize (w/o header) : 1809 Checksum: FE3E2A08 Interface Checksum : 24A9FEDB Definitions stored : 0 Symbols stored : 0 Header --- Compiler version: 2.3.1 Target processor: i386 Target operating system : Darwin-i386 Unit flags : static_linked, little_endian, local_threadvars, local_symtable FileSize (w/o header) : 2310 Checksum: FE3E2A08 Interface Checksum : 24A9FEDB Definitions stored : 3 Symbols stored : 52 Regards, Adriaan van Os ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] generated assembler
On Wednesday 03 September 2008 12.04:23 Graeme Geldenhuys wrote: On 9/3/08, Martin Schreiber [EMAIL PROTECTED] wrote: You could use breakpoints and the (dis-)assembler window of MSEide, it lists mixed pascal and machine code. Thanks Martin, I'll take a look. What I'm trying to find out (with my rusty assembler knowledge) is if a lot of IFDEF's around procedure calls, compared to only one IFDEF inside a procedure would make a difference in performance and the code generated. I would prefer example 2 (it looks cleaner and would be less work), and from my quick/crude analysis, it seems both options generate pretty much the same code if the gDEBUG define is disabled (does NOT exist). For the people who don't know MSEide attached a screenshot, I hope the file is not too big. It is with -O3. With inline there is still some overhead because of the string variable. Martin attachment: assemblerwindow.png___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] generated assembler
Hi Try fpc -sh regards Nataraj On Wed, Sep 3, 2008 at 2:37 PM, Graeme Geldenhuys [EMAIL PROTECTED] wrote: Hi, I know it's possible, but I can't remember the exact FPC parameters. How do I see the assembler generated by FPC for my source code? I need to do some optimisation comparisons looking at the assembler generated. eg: Is assembler code generated for a call to a blank (no content) procedure? The content of the procedure might be IFDEF'd out. Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] generated assembler
On 9/3/08, Martin Schreiber [EMAIL PROTECTED] wrote: For the people who don't know MSEide attached a screenshot, I hope the file is not too big. It is with -O3. With inline there is still some overhead because of the string variable. OK, thanks Martin. Debugging in MSEide seems quite impressive. I can see you put a lot of effort into writing it. PS: The image was received fine. I noticed with my own experimentation that small screenshots (not photos) work better as GIF images. It's a much better option for size reduction with no visual loss. Your image as PNG is 28K. As a GIF it's only 17.5K :-) Don't use JPG's, they are useless and look damn ugly! Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Re: FPC unit symbol checksum woes
Adriaan van Os schrieb: Florian Klaempfl wrote: Adriaan van Os schrieb: Interface definitions -- @@ -86,9 +92,10 @@ Level : 2 Class : (24) Nil Procsym : (26) SymId 57 - File Pos : 1 (94,10) + File Pos : 1 (3411,10) Are you sure ? Indeed, I were wrong. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] generated assembler
On Wednesday 03 September 2008 12.53:09 Graeme Geldenhuys wrote: On 9/3/08, Martin Schreiber [EMAIL PROTECTED] wrote: For the people who don't know MSEide attached a screenshot, I hope the file is not too big. It is with -O3. With inline there is still some overhead because of the string variable. OK, thanks Martin. Debugging in MSEide seems quite impressive. I can see you put a lot of effort into writing it. Because I implement so many bugs, I need an excellent IDE. ;-) Martin ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Re: FPC unit symbol checksum woes
Adriaan van Os wrote: Peter Vreman wrote: Thanks for the hint. I managed to rebuild the compiler with -dINTFPPU and this does produce .ppu.intf files when compiling with it. The diff between the ppudump of the the .ppu files and the .ppu.intf files does show checksum and other differences. Not sure which ones to look at. I think, I solved the checksum mystery. It is related to what Jonas wrote on the macpascal mailing list: The two main reasons I know of that currently can change the interface crc are a) calls to inline functions of which only the interface was parsed when the function was called b) calls to functions which are declared as regular functions in the interface of a unit, but as external functions in the implementation The tricky part is that fpc in macpas mode implicitely assumes that (b) happens if a procedure or function is declared in the interface part but not implemented in the implementation part ! Neither is - as far as I know - a warning issued by fpc in this situation, as CodeWarrior does ! For example, for a test program checksumwoes.pas: {$mode macpas} unit checksumwoes; interface procedure Forgotten; implementation end. the ppudump of checksumwoes.ppu.intf reads: PPU-Analyser Version 2.3.1 Copyright (c) 1998-2007 by the Free Pascal Development Team Analyzing checksumwoes.ppu.intf (v91) Header --- Compiler version: 2.3.1 Target processor: i386 Target operating system : Darwin-i386 Unit flags : little_endian FileSize (w/o header) : 519 Checksum: EE8A133F Interface Checksum : 2BCCD624 Definitions stored : 0 Symbols stored : 0 whereas the ppudump of checksumwoes.ppu reads: PPU-Analyser Version 2.3.1 Copyright (c) 1998-2007 by the Free Pascal Development Team Analyzing checksumwoes.ppu (v91) Header --- Compiler version: 2.3.1 Target processor: i386 Target operating system : Darwin-i386 Unit flags : static_linked, little_endian, local_threadvars, local_symtable FileSize (w/o header) : 1002 Checksum: 33531017 Interface Checksum : 39ACE269 Definitions stored : 2 Symbols stored : 12 I haven't checked if this solves (or works around) the compiler crash. A not implemented warning in macpas mode would be helpful ! Regards, ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] FPC 2.2.2 on Linux/SPARC
Mark Morgan Lloyd wrote: It appears I can't get that far. If I make clean make GDB_V603=1 OPT=-O- -g all I fairly promptly get .. That's working with 2.2.2 already installed. Unless I hear otherwise I'll revert to 2.2.0 when I get time and see if I can compile 2.2.2 without error with the debugging options. Starting off with 2.2.0 doesn't make any difference. If I do this 0 3[EMAIL PROTECTED]:/usr/local/src/fpc/fpcbuild# make GDB_V603=1 OPT=-O- -g all I get this /usr/local/src/fpc/fpcbuild-2.2.2/fpcsrc/compiler/ppc1 -Ur -Ur -Xs -O2 -n -Fi../inc -Fi../sparc -Fi../unix -Fisparc -FE. -FU/usr/local/src/fpc/fpcbuild-2.2.2/fpcsrc/rtl/units/sparc-linux -O- -g -dsparc -dRELEASE ../objpas/math.pp Fatal: Compilation aborted An unhandled exception occurred at $FF5673CA : EBusError : Bus error or misaligned data access $FF5673CA make[8]: *** [math.ppu] Error 217 make[8]: Leaving directory `/usr/local/src/fpc/fpcbuild-2.2.2/fpcsrc/rtl/linux' make[7]: *** [linux_all] Error 2 I can confirm that ppc1 has been recently built so should have -g etc. If I do this # cd /usr/local/src/fpc/fpcbuild-2.2.2/fpcsrc/rtl/linux # gdb /usr/local/src/fpc/fpcbuild-2.2.2/fpcsrc/compiler/ppc1 (gdb) set args -Ur -Ur -Xs -O2 -n -Fi../inc -Fi../sparc -Fi../unix -Fisparc -FE. -FU/usr/local/src/fpc/fpcbuild-2.2.2/fpcsrc/rtl/units/sparc-linux -O- -g -dsparc -dRELEASE ../objpas/math.pp (gdb) tty /dev/pts/5 (gdb) run where /dev/pts/5 is another Konsole session running bash as root, I get this: Starting program: /usr/local/src/fpc/fpcbuild-2.2.2/fpcsrc/compiler/ppc1 -Ur -Ur -Xs -O2 -n -Fi../inc -Fi../sparc -Fi../unix -Fisparc -FE. -FU/usr/local/src/fpc/fpcbuild-2.2.2/fpcsrc/rtl/units/sparc-linux -O- -g -dsparc -dRELEASE ../objpas/math.pp Program received signal SIGBUS, Bus error. 0x00011fc4 in FILLCHAR (X=void, COUNT=18, VALUE=546774876) at generic.inc:143 143 generic.inc: No such file or directory. in generic.inc (gdb) backtrace #0 0x00011fc4 in FILLCHAR (X=void, COUNT=18, VALUE=546774876) at generic.inc:143 #1 0x00011e18 in FILLCHAR (X=void, COUNT=19, VALUE=32 ' ') at system.inc:178 #2 0x0001a7c8 in SPACE (B=318767107, result=' 0,${'#2#2#2#2'},0'#0#0#0#0#0#0) at sstrings.inc:353 #3 0x0001b93c in STR_REAL (LEN=22, F=-1, D=nan(0xf), REAL_TYPE=RT_S64REAL, S='i1', highS=255) at real2str.inc:456 #4 0x0001be90 in fpc_shortstr_float (D=nan(0xf), LEN=-32767, FR=-1, RT=1, S='i1', highS=255) at sstrings.inc:403 #5 0x00215d58 in TDEBUGINFOSTABS__APPENDSYM_CONST (LIST=0xf7854df0, SYM=0xf7a55210, this=0xf7f944a0) at dbgstabs.pas:1343 #6 0x0011bd78 in TDEBUGINFO__APPENDSYM (LIST=0xf7854df0, SYM=0xf7a55210, this=0xf7f944a0) at dbgbase.pas:358 #7 0x0011c39c in TDEBUGINFO__WRITE_SYMTABLE_SYMS (LIST=0xf7854df0, ST=0xf7f7c490, this=0xf7f944a0) at dbgbase.pas:428 #8 0x00216318 in TDEBUGINFOSTABS__INSERTTYPEINFO (this=0xf7f944a0) at dbgstabs.pas:1415 #9 0x001977e8 in PROC_UNIT () at pmodules.pas:1129 #10 0x0016ebd0 in COMPILE (FILENAME='../objpas/math.pp') at parser.pas:373 #11 0x0004704c in COMPILE (CMD='') at compiler.pas:244 #12 0x000103cc in main () at pp.pas:207 (gdb) Hope I got that right. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] generated assembler
Graeme Geldenhuys wrote: Is assembler code generated for a call to a blank (no content) procedure? The content of the procedure might be IFDEF'd out. I've checked it, and it does. Mark the procedure as inline together with IFDEF-ing its code, and there will be no overhead. David ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] generated assembler
Graeme Geldenhuys wrote: PS: The image was received fine. I noticed with my own experimentation that small screenshots (not photos) work better as GIF images. It's a much better option for size reduction with no visual loss. Your image as PNG is 28K. As a GIF it's only 17.5K :-) Don't use JPG's, they are useless and look damn ugly! It's 9K in PNG if you use a palette/256 colors, much like GIF does ;) David ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] [Fwd: Re: [Lazarusdev] FPDoc links to RTL, FCL]
Michael Van Canneyt schreef: On Wed, 3 Sep 2008, Vincent Snijders wrote: Michael Van Canneyt schreef: On Tue, 2 Sep 2008, Vincent Snijders wrote: Vincent Snijders schreef: Michael Van Canneyt schreef: If you want the protected methods anywhere soon, I suggest you create a lazarus copy of the HTML docs with the options that you want. Does make rtl.chk support that by passing something like NOHIDEPROTECTED=1 to the make command? Currently not, but we can add something like it. Patches most welcome. See attached patch. Unfortunately fpdoc from trunk crashes when creating the fcl docs. Can you try to reproduce it? I used the following command line (without wrapping): make fcl.chk FPCSRCDIR=/home/vsds/src/fpc/2.3 FPDOC=/home/vsds/fpc/bin/fpdoc FPDOCOPTS=--footer=/home/vsds/src/lazsource/docs/html/sourceforgefooter.xml HIDEPROTECTED=NO You removed the --hide-protected too? It works with hideprotected. Did you test with HIDEPROTECTED=NO. Works fine. After applying the patch? Otherwise HIDEPROTECTED=NO doesn't do anything. Vincent ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] FPC 2.2.2 on Linux/SPARC
On 03 Sep 2008, at 17:05, Mark Morgan Lloyd wrote: Program received signal SIGBUS, Bus error. 0x00011fc4 in FILLCHAR (X=void, COUNT=18, VALUE=546774876) at generic.inc:143 143 generic.inc: No such file or directory. in generic.inc (gdb) backtrace #0 0x00011fc4 in FILLCHAR (X=void, COUNT=18, VALUE=546774876) at generic.inc:143 #1 0x00011e18 in FILLCHAR (X=void, COUNT=19, VALUE=32 ' ') at system.inc:178 #2 0x0001a7c8 in SPACE (B=318767107, result=' 0,${'#2#2#2#2'}, 0'#0#0#0#0#0#0) at sstrings.inc:353 #3 0x0001b93c in STR_REAL (LEN=22, F=-1, D=nan(0xf), REAL_TYPE=RT_S64REAL, S='i1', highS=255) at real2str.inc:456 #4 0x0001be90 in fpc_shortstr_float (D=nan(0xf), LEN=-32767, FR=-1, RT=1, S='i1', highS=255) at sstrings.inc:403 #5 0x00215d58 in TDEBUGINFOSTABS__APPENDSYM_CONST (LIST=0xf7854df0, SYM=0xf7a55210, this=0xf7f944a0) at dbgstabs.pas:1343 #6 0x0011bd78 in TDEBUGINFO__APPENDSYM (LIST=0xf7854df0, SYM=0xf7a55210, this=0xf7f944a0) at dbgbase.pas:358 #7 0x0011c39c in TDEBUGINFO__WRITE_SYMTABLE_SYMS (LIST=0xf7854df0, ST=0xf7f7c490, this=0xf7f944a0) at dbgbase.pas:428 #8 0x00216318 in TDEBUGINFOSTABS__INSERTTYPEINFO (this=0xf7f944a0) at dbgstabs.pas:1415 #9 0x001977e8 in PROC_UNIT () at pmodules.pas:1129 #10 0x0016ebd0 in COMPILE (FILENAME='../objpas/math.pp') at parser.pas:373 #11 0x0004704c in COMPILE (CMD='') at compiler.pas:244 #12 0x000103cc in main () at pp.pas:207 (gdb) Hope I got that right. Yes, you did. Thanks. The bug is indeed in fillchar in generic.inc: { Align on native pointer size } aligncount:=(PtrUInt(pdest) and (sizeof(PtrUInt)-1)); dec(count,aligncount); pend:=pdest+aligncount; That make aligncount equal to the misalign count, rather than to the number of bytes necessary to align the pointer. It should rather be something like this: pend:=align(pdest,sizeof(ptruint)); dec(count,pend-pdest); I'll look at it tomorrow. Jonas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel