[fpc-pascal] showing source linenumbers on exceptions

Gerhard Scholz gs at g--s.de
Mon Jun 27 23:07:44 CEST 2005


Hi,

compilation with the parameter -gl should do your job:

   ppc386 -gl myprogram

(if your compiler name is ppc386, else insert your name instead

Gerhard

-----Urspr√ľngliche Nachricht----- 
Von: "Bartek" <bbartek at gmx.net>
An: <fpc-pascal at lists.freepascal.org>
Gesendet: Montag, 27. Juni 2005 22:51
Betreff: [fpc-pascal] showing source linenumbers on exceptions


> hi,
>
> how can i show source line numbers, when an exception occurs, like
> sysutils do?
> ...
> An unhandled exception occurred at $0040E9B5 :
> EInOutError : Invalid filename
>   $0040E9B5  TDXF__LOAD,  line 271 of dxffile.pas
>   $0040EFFA  TDXF__CREATE,  line 329 of dxffile.pas
>   $0040F24A  TPAPER__CREATE,  line 48 of dxfpaper.pas
>   $00401459  INIT_OBJECTS,  line 63 of e:/_development/work/dxf2mcr.pas
>   $00401529  INITPROC,  line 87 of e:/_development/work/dxf2mcr.pas
>   $00401F1F  INIT_FRAMEWORK,  line 107 of
> E:/_development/units/uframe_sdlogl.pas
> ...
>
> the only thing i found is the ShowExeption proc. but this does not write
> what i expected.
> ...
> exception at 0040EA45:
>                       Invalid filename.
> ...
>
> is there a possibility to do this on my own?
> if found the proc:
> ...
> Procedure CatchUnhandledException (Obj : TObject; Addr: Pointer;
> FrameCount: Longint; Frames:
> PPointer);[public,alias:'FPC_BREAK_UNHANDLED_EXCEPTION'];
> ...
> but i don't how to set FrameCount and Frames.
>
> thanks in advance
> bartek
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>





More information about the fpc-pascal mailing list