[Lazarus] heaptrc - Is it even worth using?

Sergei Gorelkin sergei_gorelkin at mail.ru
Mon Oct 5 19:31:48 CEST 2009


Lee Jenkins wrote:
> 
> Now, for my own personal education:
> 
 > (skipped)
> 
> In the above trace, it looks like (and I have confirmed) the leak occurs 
> inside of the LoadMappings method when I was using the TXMLDocument 
> object before updating my lazarus snapshot, but I am curious as to why 
> the addresses shown after "$00422EBB  TMAPPINGREADER__LOADMAPPINGS" are 
> blank and do not show entry into or use of TXMLDocument object.  
> Unfortunately, I am not that experienced or skilled in the lower level 
> stuff.
> 
> Thanks for any clarification.
> 
That's most probably because the fcl-xml package was compiled without 
debug info. Heaptrc uses debug info to resolve addresses into function 
names. Recompling the RTL and packages with `make clean all OPT=-gl; 
sudo make install' command typically solves such issues.

Lineinfo stuff is also not bug-free. Sometimes it helps (at least, 
helped for me) to run 'gdb your_program' at console and then enter 
'disassemble <address>'. Gdb reads debuginfo in a different way, and 
therefore sometimes it prints function names where lineinfo fails.

Regards,
Sergei




More information about the Lazarus mailing list