www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7634] New: optlink creates bad debug info for a large number of modules


           Summary: optlink creates bad debug info for a large number of
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Optlink
        AssignedTo: nobody puremagic.com
        ReportedBy: r.sagitario gmx.de

--- Comment #0 from Rainer Schuetze <r.sagitario gmx.de> 2012-03-03 04:03:43
PST ---
Here's some code to generate 4000 functions:

import std.stdio;
import std.typetuple;

template countTuple(int n)
    static if (n > 0)
        alias TypeTuple!(countTuple!(n - 1), n - 1) countTuple;
        alias TypeTuple!() countTuple;

void func(int i, int j)()
     writeln(i, j);

void fun()
    foreach(i; countTuple!(40))
        foreach(j; countTuple!(100))
            func!(i, j)();

When compiling it to a library with debug information:
dmd -g -lib test.d
And linking it with a simple main.d: import test; void main() { fun(); }
dmd -g main.d test.lib
the linker generates bad sstModule information for modules #2730, #4095, #6826,..., e.g. Module #2730 (0074CB64) SubSection: 0000 (<undefined>) iMod: 0 lfo: 76412 cb: 25 unsupported type 0 Module #2731 (0074CB70) SubSection: 0120 (sstModule) iMod: 2731 lfo: 76440 The module numbers seem fixed, they also appear in completely different code. BTW: if you increase the numbers of functions to 10000, optlink crashes. Maybe some of the other reported crashes are related. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 03 2012