[Lazarus] RE : RE : RE : RE : RE : RE : RE : Console App Development

Martin lazarus at mfriebe.de
Mon Aug 15 17:27:58 CEST 2011


On 15/08/2011 16:04, Ludo Brands wrote:
>> On 15/08/2011 15:14, Ludo Brands wrote:
>>> The debugger in lazarus didn't allow me to inspect the
>> refcount of the
>>> string though and crashed on me.
>> Afaik:
>>
>> (^longint(str)-2)^
>>
>>
> I tried to do something similar but that is where gdb crashed on me...
>
> In the mean time I found where the refcount increases:
> DoOpenUnknownFile
> ->CodeToolBoss.GetSourceType
> ->FCurCodeTool.GetSourceName
> ->TPascalReaderTool.BuildTree<- this where the refcount increases to 2
>
> BuildTree is a complex piece of code and I'll need a good night of rest
> before attacking this. BeginParsing(Range); increments the refcount but that
> is as far as I got. Perhaps the author of the code could shed some light?
>


I think I managed to trap that one.

for the FIRST codebuffer opened, I got the following inc-ref. I have not 
checked dec ref.


check the attached file, unrar, and import in debug history.

unfortunately clicking stack frames will not jump. due to absolute path 
used. ( on my todo)

requires laz trunk)


the 2nd watch shows the ref count value. not sure if that is before or 
after change....


-------------- next part --------------
A non-text attachment was scrubbed...
Name: fsource_ref.rar
Type: application/octet-stream
Size: 4015 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110815/899494d6/attachment-0003.obj>


More information about the Lazarus mailing list