[Issue 17619] [REG2.072] Wrong debug line information with single line loops

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Jul 22 03:10:47 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=17619

--- Comment #3 from Rainer Schuetze <r.sagitario at gmx.de> ---
I recently analyzed this a bit: dmd now attaches both lines 3 and 6 to the
DWARF info for the loop increment, and gdb selects 6 now.

dmd also elides some unconditional jumps, even in debug builds. I suspect
avoiding this can help.

>> When breaking inside test2, the call stack will look like it is being
>> called by test1();
> I don't observe such behaviour with an older dmd.

gdb seems to be a bit better in this regard than the VS debugger: even if the
return address after the call instruction is annotated with a different line,
it still displays the line of the call itself. VS shows the line after the call
(if there are no call cleanup instructions).

--


More information about the Digitalmars-d-bugs mailing list