[fpc-devel] Re: [fpc-pascal] Calling unassigned procedure gives no stack trace with -gl
peter at freepascal.org
Fri Jul 15 10:13:02 CEST 2005
>> > > So, where should a solution come from? Where in the
>> > > chain would a change be needed to make it work properly?
>> > For *nix: prt/crt0, there is a xorl %ebp,%ebp But there might be code
>> > that relies on this (main program's parent's frame being nil)
>> (Continuing the thread from the fpc-pascal list on fpc-devel.)
>> But why then is a stack trace generated for the unhandled assert
>> and not for the unhandled access violation (under Linux 386)?
> The first is a called procedure, the other an exception handler I guess
> (Peter already hinted at that).
This is out of reach for fpc. It is the linux kernel that resets ebp
>> Under Mac OS X (Darwin), I do get stack traces in both cases. However,
>> in spite of compiling with -gl, I don't get line numbers in either case.
>> What is the cause for that?
> I don't know, but FPC/Darwin's startup mechanisms are afaik a bit
> due to the mandatory libc use on Darwin. Linux and FreeBSD are by default
> still free of libc.
The lineinfo unit doesn't support Darwin yet.
More information about the fpc-devel