[Issue 20253] New: bad debug line info for function without epilog
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sun Sep 29 18:15:55 UTC 2019
    
    
  
https://issues.dlang.org/show_bug.cgi?id=20253
          Issue ID: 20253
           Summary: bad debug line info for function without epilog
           Product: D
           Version: D2
          Hardware: All
                OS: Windows
            Status: NEW
          Keywords: symdeb
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: r.sagitario at gmx.de
This module:
string foo(string s1, string s2)
{
    throw new Exception("x");
}
built with "dmd -g -m64 test.c" generates an object file with invalid debug
line info:
***** SECTION #C
*** LINES
  0000:00000000-00000086, flags = 0000, fileid = 00000000
      2 00000000      4 00000013
  fileid = 00000008
   2607 00000060
  fileid = 00000000
      5 00000086
 <<<< WARNING >>>> 1 line/addr pairs are out of bounds!
*** SYMBOLS
(000064) S_UDT:             0x1004, string
(000073) S_GPROC32: [0000:00000000], Cb: 00000086, Type:             0x1006,
dbginf.foo
         Parent: 00000000, End: 00000000, Next: 00000000
         Debug start: 00000013, Debug end: 00000086
(0000A5)  S_REGREL32: rbp+00000010, Type:             0x1007, s2
(0000B6)  S_REGREL32: rbp+00000018, Type:             0x1007, s1
(0000C7)  S_ENDARG
(0000CB) S_END
The line info beyond the end of the function can overlap with code of the
following function, causing it not to be shown in the debugger.
--
    
    
More information about the Digitalmars-d-bugs
mailing list