[Lazarus] Stepping into the LCL with fpdebug

Luca Olivetti luca at wetron.es
Mon Apr 22 11:29:53 CEST 2024


El 22/4/24 a les 11:22, Luca Olivetti via lazarus ha escrit:
> El 22/4/24 a les 11:13, Luca Olivetti via lazarus ha escrit:
>> El 22/4/24 a les 11:02, Martin Frb via lazarus ha escrit:
>>> On 22/04/2024 10:37, Luca Olivetti via lazarus wrote:
>>>>
>>>>> But if they have it would be super useful to have a setting "use 
>>>>> the debug setting of the system unit", but there is not.
>>>>>
>>>>> You can add the -gw3 flag depending on build mode:
>>>>> https://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Add_a_flag_to_project_and_all_packages
>>>>
>>>> Then why I can step into the LCL with gdb and -gl?
>>>> I'm already using the additions and overrides but I don't currently 
>>>> specify any debug option there.
>>>
>>> packages (even if rebuild) have their own settings what debug info 
>>> type they use.
>>>
>>> This is in each package's options.
>>>
>>> LCL and many packages also include the settings that you specify in 
>>> "Tools > Configure build Lazarus". So you can specify the setting there.
>>>
>>> Or you can specify in "Additions and Overrides" with Target 
>>> packagname, or *
>>
>>
>> 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?
>>
> 
> Adding "-gw3" to the options in "Tools->Configure build lazarus" allows 
> me to step into the LCL.
> I tried that before but building lazarus failed (I don't remember the 
> exact error).
> That doesn't explain why I didn't need to to that with gdb and -gl.

Spoke too soon: while I can step into the LCL directly, if I put a 
breakpoint in one of my packages (in a function which is called by the 
LCL, it implements a THelpManager), fpdebug doesn't stop at the breakpoint.
For it to work I have to add -gw3 to the "additions and overrides" (and, 
sorry to repeat myself, I didn't need to to that with gdb and -gl).

Bye

-- 
Luca Olivetti
Wetron Automation Technology https://wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007



More information about the lazarus mailing list