Allez, the last for tonight, after I let you in peace.
I forced myself to create a horrible bug in the test program:
procedure tmainfo.onac(const sender: TObject);
var
x : integer = 0;
y : integer;
begin
y := 10 div x;
end;
Yes, it is a bad bug.
But, thanks to
fpd :
red@fredvs ~> /home/fred/fpdebug/fpd /home/fred/demo_mse/aatest/test
FPDebugger on Linux for x86_64 (2021/11/20 00:01:39 FPC: 3.2.2)
Copyright (c) 2006-2009 by Marc Weustink
starting....
Using file: /home/fred/demo_mse/aatest/test
FPD>run
FPD>continue
===
/home/fred/demo_mse/aatest/main.pas 45:13 ONAC
[$0000000000465830+17] y := 10 div x;
===
[$0000000000465841] 48F7F9 idiv rcx
[$0000000000465844] C3 ret
[$0000000000465845] 0000 add [rax],al
[$0000000000465847] 0000 add [rax],al
[$0000000000465849] 0000 add [rax],al
[$000000000046584B] 0000 add [rax],al
Program raised exception class 'External: Unknown exception code 8'.
FPD>q
Quitting ...
Killing application ...
Process ended with exit-code 0.
fred@fredvs ~>
And
fpd shows the right line/row on the right unit.
But
External: Unknown exception code 8' shows too that some other signal like
SIGFPE = 8 should be added too.
Anyway, many WOW to
fpd developers.
[EDITED] Added zip of changed files, included missing signals:
fpd.lpr, fpdglobal.pas, fpdloop.pas are in
/lazarus-main/components/fpdebug/app/fpd/and
fpdbglinuxclasses.pas is in
/lazarus-main/components/fpdebugAnd here the binary of
fpd for Linux 64 bit compiled with fpc 3.2.2.
https://github.com/fredvs/attach/files/7573771/fpd_linux_amd64.zipFre;D
[LAST EDIT]
Note that
fpd binary in attachment was compiled
without optimization.
With
-O2 there is that error message with command "
run":
fred@fredvs ~> /home/fred/fpdebug/fpd /home/fred/demo_mse/aatest/test
FPDebugger on Linux for x86_64 (2021/11/20 05:01:52 FPC: 3.2.2)
Copyright (c) 2006-2009 by Marc Weustink
starting....
Using file: /home/fred/demo_mse/aatest/test
FPD>run
Exception at 000000000046CD2C: EAssertionFailed:
TFpThreadWorkerQueue.TFpDbgTypedFifoQueue.PushItem: Result (fpdbgutil.pp, line 900).
FPD>
[VERY LAST EDIT]
Compiling with
-O2 and
fpc 3.2.2 gives error with command "run" (see previous edit).
But compiling with
-O2 and
fpc 3.3.1 gives
NO error with command "run".
Always finish with good news.
This one, I really need to go to bed.