[fpc-pascal] heap trace with line info on macOS
Martin Frb
lazarus at mfriebe.de
Wed Oct 15 20:37:32 CEST 2025
On 15/10/2025 20:29, Jonas Maebe via fpc-pascal wrote:
> On 15/10/2025 11:15, mailinglists--- via fpc-pascal wrote:
>> Hi.
>>
>> I can enable heap trace and line info as usual with the -gh and -gl
>> command line parameters - to report any memory leaks in my
>> application. But no matter what I try, I get the memory leak dump,
>> but always without line information.
>>
>> Is this not a supported feature on macOS?
>
> It should work on trunk if you also compile with -Xg
>
If you don't have/want trunk, but are able to use the Lazarus IDE, there
is a feature "Leaks and traces" (in the view menu) (requires package
"leakview", but installed by default).
This has a "resolve" button. If you paste the trace (address only),
press resolve, and select the exe then it should translate the addresses.
It should work on Mac too / Though I haven't tested it in ages. (If it
doesn't / apologies for the noise)
Not sure if you need to select the app bundle, or the exe inside the app
bundle.
More information about the fpc-pascal
mailing list