Bug 19989 – Bad debug line info with default arguments in other file

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2019-06-20T15:20:50Z
Last change time
2024-12-13T19:04:08Z
Keywords
DebugInfo
Assigned to
No Owner
Creator
Rainer Schuetze
Moved to GitHub: dmd#19589 →

Comments

Comment #0 by r.sagitario — 2019-06-20T15:20:50Z
////////////////////// 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).
Comment #1 by robert.schadek — 2024-12-13T19:04:08Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19589 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB