I tried to follow it by changing debugger from default FpDebug (what do not promise a lucky way) to GDB (just to follow a wiki guidance) but ... ups.
Which page on the wiki? That page is outdated.
The current recommendation for debugger:
On Windows and Linux: FpDebug
On Mac: LLDB with FpDebug
Use GDB (or gdb server), only if you
- Do Remote debugging (to another machine / using gdbserver)
- Do not have an Intel/AMD (compatible) cpu. (Except on Mac, where M2 is supported by the above recommendation)
(And except for cross AVR, for which there is an FpDebug variant)
- Have a 32bit IDE but want to cross debug a 64bit application (better get the 64bit IDE)
- On Mac, and have this issue:
https://forum.lazarus.freepascal.org/index.php/topic,61261.0.html- Very few other edge cases.
As for the error: That is (99% likely) a bug in GDB. Nothing we can do (hence we wrote FpDebug, because at least with that: We can do).
In case you want to experiment further with GDB: Make sure you did not use "Dwarf 3" => This increases the chances of crashing GDB.
"Dwarf 2 with sets" is better.
Then try different GDB versions, sometimes older are better. (For Windows we have a few for download, on our sourceforge page).