Bug 19991 – win32: bad debug line info with unwining code

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2019-06-21T07:20:46Z
Last change time
2024-12-13T19:04:11Z
Keywords
DebugInfo
Assigned to
No Owner
Creator
Rainer Schuetze
Moved to GitHub: dmd#19590 →

Comments

Comment #0 by r.sagitario — 2019-06-21T07:20:46Z
Compile this code with debug information for Win32 (i.e. with -m32 or -m32mscoff): int mightThrow(int x) { return x; } int main() { int x = 3; if (x == 0) // step in debugger return 1; // jumps here scope(exit) x = -1; mightThrow(1); // and continues here return 0; } Stepping over the if statement shows the return statement as the next instruction, even though the next step continues with the call to mightThrow. This is caused by the instruction settings the "exception marker" that remembers the code position for unwinding. It is considered to be part of the if statement.
Comment #1 by robert.schadek — 2024-12-13T19:04:11Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19590 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB