[fpc-pascal] Source line numbers during execution
bartek
bbartek at gmx.net
Tue Jul 11 12:51:29 CEST 2006
Graeme Geldenhuys schrieb:
> On 7/11/06, Luiz Americo Pereira Camara <pascalive at bol.com.br> wrote:
>> It works under Linux, it uses Simpleipc for app comunication. I tested
>> it in Ubuntu Dapper Drake. The only issues i am having are related in
>> Know Issues section.
>>
>> Luiz
>
>
> Excellent! Thanks Luiz...
>
> Graeme.
>
>
Don't know whether you can use it, but this is the function I use for my
stack traces.
procedure csl_log(e: Exception);
var
FrameCount: integer;
Frames: PPointer;
FrameNumber: integer;
begin
csl_log(1, 'EXCEPTION ' + e.message); // this csl_log simply is
csl_log(depth: integer; log: string); depth defines the indent in my log
csl_log(0, 'Class: ' + e.ClassName);
csl_log(1, 'Stack trace:');
csl_log(0, BackTraceStrFunc(ExceptAddr));
FrameCount := ExceptFrameCount;
Frames := ExceptFrames;
for FrameNumber := 0 to FrameCount - 1 do csl_log(0,
BackTraceStrFunc(Frames[FrameNumber]));
csl_log(-1, 'done');
csl_log(-1, 'catched');
end;
If anything can be made better, feel free to contact me.
bartek
More information about the fpc-pascal
mailing list