Finding the file and unittest that triggers an ICE during dub project build only when unittests are enabled

Per Nordlöw per.nordlow at gmail.com
Sat Jun 13 11:14:23 UTC 2020


On Friday, 12 June 2020 at 21:54:57 UTC, H. S. Teoh wrote:
> On Fri, Jun 12, 2020 at 09:29:06PM +0000, MoonlightSentinel via 
> Digitalmars-d-learn wrote:
>> On Friday, 12 June 2020 at 18:18:25 UTC, Per Nordlöw wrote:
>> > How do I most easily track down which unittest in which file 
>> > that causes the crash?
> [...]
>
> Compile your program with debugging symbols, and then run it in 
> gdb. When it crashes, the `bt` command should show you the 
> stack trace. Near the bottom of the trace (top of the stack) 
> should be the unittest function with a name that looks like 
> _D4test16__unittest_L5_C1FZv, where L5 means the unittest that 
> started on line 1 of the source, and C1 means the column on 
> that line, and "FZv" is the mangling of the unittest's 
> attributes, and "_D4test" is the mangled name of the module, 
> corresponding to "test".

The crash happens during compilation not during unittest 
execution.




More information about the Digitalmars-d-learn mailing list