Which debugger can explain InvalidMemoryOperationError?

Rainer Schuetze r.sagitario at gmx.de
Fri Jan 18 07:48:21 UTC 2019



On 17/01/2019 23:12, Victor Porton wrote:
> On Thursday, 17 January 2019 at 16:37:55 UTC, Victor Porton wrote:
>> After main() of my program finishes, I have this error message:
>>
>> core.exception.InvalidMemoryOperationError at core/exception.d(700):
>> Invalid memory operation
>>
>> Which debugger (preferably with a GUI interface) do you suggest to
>> investigate this error?
>>
>> I tried DDD and KDbg.
>>
>> In DDD when I set `catch throw InvalidMemoryOperationError` or `catch
>> throw core.exception.InvalidMemoryOperationError`, the exception is
>> not called nevertheless.
>>
>> In KDbg, I don't see any way to set an exception breakpoint, at all.
>>
>> I use LDC2.
> 
> I've tried it with plain GDB 8.2.
> 
> The following does not work:
> 
> catch throw InvalidMemoryOperationError
> catch throw core.exception.InvalidMemoryOperationError
> 
> Despite of the above commands, the exception is not caught and so I am
> unable to see the callstack which has led to the exception.
> 
> Please help me to find a way to see the callstack in order to be able to
> debug my software!

You might want to set a breakpoint on function
onInvalidMemoryOperationError. Probably this is the function that is
throwing the error.

Debugging experience will likely improve if you build the runtime
library with debug information. (see
https://wiki.dlang.org/Building_under_Posix).


More information about the Digitalmars-d-debugger mailing list