[Lazarus] heptrc

Martin lazarus at mfriebe.de
Tue Jun 12 16:20:07 CEST 2012


On 12/06/2012 14:14, Antonio Fortuny wrote:
>
>>
>> there is a button "resolve". select the exe that leaked. it is a new 
>> feature. it SHOULD resolve any address for which symbols exist
> But it does not really :-\
>
> I've prepared a new virtual machine with W7-Win32
> Lazarus full 1.1 from 2012-06-11 + WinCE for cross-compile
> Made a very simple project (one form, two buttons one to create a 
> memory leak, one to close)
> Redirect heaptrc output to a file
> Set compiler options for compiler and linker:
> -g automatic debugger
> -gl add line numbers
> -gh use heaptrc
> -WG win32 program
> compile, link and run and get this:
> /*c:\sources\compiled\TestUib.Exe *//*
> Call trace for block $001D62B0 size 16*/ <<======== my block, looks OK
> /*  $0040D628
>   $004FAA4E  TCONTROL__CLICK,  line 2735 of ./include/control.inc
> */the result whether I use -gs or -g. I can easily guess that both 
> blank lines with only an address are the two lines of my project
> I've installed leakview but the Resolve button resolves anything with 
> the project.exe
> Thea ddress /*$0040D628*/ corresponds to the function Reallocmem 
> function used to get the memory block

can you try

gdb.exe /*c:\sources\compiled\TestUib.Exe*/

info line *0x0040D628

The whole thing is rather odd. From what you described, you done the 
correct steps. And it works, if I do it here (vista 32 bit). Though I 
use the released fpc 2.6.0 (that may still be an idea)

I can only see 2 reasons.
1) For some reason, fpc did not write or link symbol info for your unit.
2) The stabs reader in fpc has problems reading it ("resolve" uses the 
same reader)

In case 2 gdb should be able to read it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20120612/30a30633/attachment-0003.html>


More information about the Lazarus mailing list