[Issue 19991] New: win32: bad debug line info with unwining code
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jun 21 07:20:46 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19991
Issue ID: 19991
Summary: win32: bad debug line info with unwining code
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Keywords: symdeb
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: r.sagitario at gmx.de
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.
--
More information about the Digitalmars-d-bugs
mailing list