Tracing down core.exception.InvalidMemoryOperationError

Martin Drasar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jul 28 06:30:53 PDT 2014


On 28.7.2014 14:09, Joakim via Digitalmars-d-learn wrote:
> More broadly speaking, it is thrown whenever certain memory operations
> are attempted while the GC is running, 6 in all, as you can see here:
> 
> https://github.com/D-Programming-Language/druntime/blob/master/src/gc/gc.d#L458
> 
> 
> I believe I stuck in printfs till I found out which one was run before
> the error was thrown, and then traced that back with more printfs to
> where it was getting called.  I didn't have a debugger available, you
> may be able to trace faster with one.

Hi,

thanks for the tip. I have a debugger at hand and I am would prefer to
use it. However, I don't really know where and how to start. I would
like to break at core/exception.d when onInvalidMemoryOperationError is
called, but I am not sure how to build druntime with debug information.
There does not seem to be some flag in the makefile like for dmd.

Is there some document describing how to do this?

Thanks,
Drasha


More information about the Digitalmars-d-learn mailing list