[Issue 19989] New: Bad debug line info with default arguments in other file
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jun 20 15:20:50 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19989
Issue ID: 19989
Summary: Bad debug line info with default arguments in other
file
Product: D
Version: D2
Hardware: All
OS: Windows
Status: NEW
Keywords: symdeb
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: r.sagitario at gmx.de
//////////////////////
module dbi2;
string def() { return "test"; }
void fun3(string arg = def()) // line 5
{
}
//////////////////////
module dbi;
import dbi2;
void main() // step once from here
{
fun3(); // line 7
}
//////////////////////
Compile with "dmd -g -m64 dbi.d dbi2.d", open debugger and set breakpoint at
"void main()":
- when stepping over/into once, the debugger immediately jumps to fun3. It
should step to the call at line 7 instead.
- with the impression of having stepped into fun3, "step out" runs until main()
returns.
- trying to set a brakpoint at line 7 seems to do nothing, it is set at dbi2.d,
line 5 instead
https://github.com/dlang/dmd/pull/6327 seems to have fixed this for expressions
from the same file (it looks ok if fun3 is declared in module dbi).
--
More information about the Digitalmars-d-bugs
mailing list