[fpc-pascal] Debug information again
a.fortuny at sitasoftware.lu
Wed Jun 13 13:58:46 CEST 2012
I've got a serious prblem too with debugger and heaptrc.
It look like the one described by *Rainer Stratmann *posted last month.
My problem goes around the tracing of memory leaks.
I've been busy with Martin on the Lazarus mailing list and he couldn't
find why addresses were not followed by their line reference.
Apparently all tracing references from the program seem to be omitted or
maybe better, unreachable.
When I do a strip from the program executable it shrinks from 17 meg
down to 2.5 meg. So something is in it.
I can see the memory leak I have generated (read below) but no refecence
to the line itself. Instead I receive the reference lines before and
after the memory leak creation inside the rtl.
W7-win32, Lazarus 1.1 from 2012-06-11, WinCE target added and compiles OK
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:
do not use INLINE style C++
-O- omit any optimization
-g automatic debugger
-gl add line numbers
-gh use heaptrc
-WG win32 program
compile, link and run and get this:
Heap dump by heaptrc unit
756 memory blocks allocated : 1539928/1541288
755 memory blocks freed : 1539912/1541272
1 unfreed memory blocks : 16*/ <<======== my block, looks OK
/*True heap size : 655360 (96 used in System startup)
True free heap : 658416
Should be : 655184
Call trace for block $001D62B0 size 16*/ <<======== my block, looks OK
$004FAA4E TCONTROL__CLICK, line 2735 of ./include/control.inc
$00512A7F TBUTTONCONTROL__CLICK, line 56 of ./include/buttoncontrol.inc
$005130B6 TCUSTOMBUTTON__CLICK, line 175 of ./include/buttons.inc
$00513711 TBUTTON__CLICK, line 355 of ./include/buttons.inc
$005129AA TBUTTONCONTROL__WMDEFAULTCLICKED, line 26 of
$004EDBEF TWINCONTROL__WNDPROC, line 5298 of ./include/wincontrol.inc*/
Thea ddress /*$0040D628*/ corresponds to the function Reallocmem
function used to get the memory block
Problem is that I need to debug a complicated package which leaves a lot
of memory leaks that I have to trace and correct.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal