[Lazarus] Stepping into the LCL with fpdebug
Martin Frb
lazarus at mfriebe.de
Mon Apr 22 11:47:18 CEST 2024
On 22/04/2024 11:13, Luca Olivetti via lazarus wrote:
>
> That doesn't answer my question: then how is it possible that I can
> step into the lcl with gdb and -gl even if I don't specify "-gl" in
> additions and overrides?
Because your LCL is probably build with STABS. And gdb can read stabs,
but FpDebug can't.
The problem is -g => and that is also the reason for the "Chose DWARF"
dialog that pops up when you haven't explicitly set your project to dwarf.
-g is decided by FPC, it can be stabs or dwarf. Depends on Target and
fpc version. The IDE does not have a list, so (prior to compiling it
does not know). Therefore when using FpDebug the IDE requires explicit
set to Dwarf. (But only checks the project).
Ideally the IDE should have a setting "Use IDE default" or "Follow
project" for packages. But you can't put that in Makefiles (which are
still used), because it would need to be translated before handing it to
fpc.
Still, if we accept that any "just installed" or "build with make" files
get immediately rebuild by the IDE, then it could be added.... But it
hasn't yet (and probably is major work)
> For the record: it is *not* necessary to add -gw3 to "configure build
> lazarus", it's enough to put it in the "additions and overrides".
Yes, it's either, or, or both.
Additions and Overrides (with *) will affect ALL packages, even 3rd
party. As long as they are part of the project (except RTL, because the
IDE does not rebuild RTL / or fpc packages dir).
"Configure build Lazarus" only affects (most) packages that came with
Lazarus. => they have $(IDEBuildOptions) in their "custom options".
But once done, it is done for all projects (for the packages that follow
it).
More information about the lazarus
mailing list