[fpc-devel] Problem with compilation (unknown crash)
Tomas Hajny
XHajT03 at hajny.biz
Tue Nov 13 16:52:00 CET 2012
On Tue, November 13, 2012 13:46, Michel Catudal wrote:
> Le 13/11/2012 03:12, Tomas Hajny a ĂŠcrit :
>> On Tue, November 13, 2012 02:08, Michel Catudal wrote:
>>> Le 12/11/2012 07:34, Jonas Maebe a ĂŠcrit :
>>>> On 12 Nov 2012, at 13:32, Michel Catudal wrote:
>>>>
>>>>> Is there a way to figure out when a crash occurs, in other words get
>>>>> the compiler to tell me the conditions that made it crash the
>>>>> compilation?
>>>> By debugging the compiler. Add OPT="-O- -gl" to add debug information
>>>> and disable optimizations.
>>>>
>>>>
>>>> Jonas
>>>>
>>> Isn't this just to add debugging information for using gdb?
>> No, not only: -gl ensures including line information and allows
>> providing
>> information about source lines related to the stack.
>>
>>> The crash here is during compilation
>>>
>>> with the -gl flag :
>> .
>> .
>>
>> Make sure to add also "-Xs-" (i.e. OPT="-O- -gl -Xs-").
>>
> It gave no additional information :
>
> /home/michel/packages/BUILD/avr32-fpc-2.7.1/compiler/ppcrossavr32 @rtl.cfg
> -Ur -Tembedded -Pavr32 -XPavr32-embedded- -Xr -Ur -Xs -O2 -n -Fi../inc
> -Fi../avr32 -FE.
> -FU/home/michel/packages/BUILD/avr32-fpc-2.7.1/rtl/units/avr32-embedded
> -O- -gl -Xs- -davr32
> -dRELEASE -O- -gl -Xs- -Us -Sg system.pp
> Fatal: Compilation aborted
> An unhandled exception occurred at $000000000049E010:
> EAccessViolation: Access violation
> $000000000049E010
.
.
Oops. :-( Could you please check the options used when building your
(cross-) compiler (i.e. compilation of ppcrossavr32 mentioned above). I
have no direct experience with cross-compilers myself and it might be that
different options are used for building the cross-compiler and for
compiling with this cross-compiler in our makefiles. If the command line
generated by our makefiles includes those -O- -gl -Xs- options (similarly
to the command line used when compiling system.pp indicated above), it
probably means that the stack is probably corrupted somehow and the only
chance is really running the compilation (using the same parameters listed
above) inside gdb as suggested by Jonas.
Tomas
More information about the fpc-devel
mailing list