[Lazarus] Debugger stops in c dll even when no breakpoint set

Luca Olivetti luca at wetron.es
Wed Nov 24 14:38:34 CET 2021

El 24/11/21 a les 14:29, Martin Frb via lazarus ha escrit:

>> I don't know where that message came from, but is there a way to see 
>> it while debugging the application under lazarus?
> I would guess this is based on 
> https://docs.microsoft.com/de-de/windows-hardware/drivers/debugger/gflags-and-pageheap 
> Now there are 2 modes: "standard" and "full"
> Note: this is only about mem on the heap. Local vars on the stack are 
> not affected (except, if (like objects) they are pointers to the heap, 
> then the heap part (and only that) will be affected)
> "Standard" only detects, overruns when mem is freed.
> If I understand this correctly, in FPC you can enable -gh heaptrc, and 
> this will do something similar, but limited...

Yes, I routinely do that, but it only works for pascal code. In this 
case it was a c dll (that I wrote as a bridge between another dll and my 
pascal code) so heaptrc wouldn't catch that error.
I suppose the message comes from some windows core dll and windbg can 
display it, I don't know if and how gdb can (I'm not using fpdebug yet, 
maybe it can?).

Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007

More information about the lazarus mailing list