Forum > General

Draft 3 (-gw3) is suggested by default?


When create new project, need to be set format for debugger. And by default it is suggested Draft 3 (-gw3)...

Why, as this is still unstable option? If I choose it as suggested, all kind of SIGSEG (whatever) errors popup on end or during debugging trivial app. What option to use anyway, -gw perhaps?

Well most important:
- What OS are you using?
- What CPU type (intel/amd or arm or M2 or other)? 32 or 64 bit
- In your Config (Tools > Options > Debugger Backend) which debugger is selected?
- Are you using Lazarus 3.0

If you are on Mac, then the answer will differ from the below....

Since it does ask you which debug info to use, you are most likely using FpDebug. Which is the default.
The alternative is gdb, the stability of which varies greatly depending on version of gdb (depends on your OS).

--- Quote ---, all kind of SIGSEG (whatever) errors popup on end or during debugging trivial app.
--- End quote ---

1) The debugger reports a sigsegv in your app
   The attached image show an error in the debugged app "Project YOURAPPNAME raised....".

2) The IDE says that the IDE itself had an error?
   If the IDE had an error, the dialog has an "ok" and a "cancel" button, and pressing "cancel" will close the IDE without any question, and without saving any data.

If (1), then this is very unlikely an issue of the DWARF choice.

If (2) and if you are on certain versions of Linux, then there is a known issue, that was only discovered after release of 3.0 (and is fixed for 3.2 / in fixes-3 branch). Those distros install some of the OS libs with debug info in a format that is not compatible with the debugger, but not detected as such. So if any app uses such a .so lib on such a Linux distro then it will crash FpDebug. (and no IDE setting will change that). In this particular case GDB can be used until 3.2 is released.

For all else a bit more info is needed.

I have made screenshot when that happens, I need to find it...

There is no error message when select -gw and debug.

What I have? The latest official version of lazarus (deb) and updated Neon 5.27, Ryzen.

The practice is: do not select any option as suggested/default if it is not secure. And -gw3 certainly is.


[0] Message Index

Go to full version