[Issue 13583] New: Inconsistent naming of template arguments in debug symbols

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Oct 7 00:38:43 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13583

          Issue ID: 13583
           Summary: Inconsistent naming of template arguments in debug
                    symbols
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: r.sagitario at gmx.de

Compiling this code:

///////////
class Token
{
    string text;
}

class DList(T)
{
    T x;
}

void replaceToken(DList!(Token) tokens)
{
}

void main() 
{
    replaceToken(null);
}
////////////

with "dmd -g -m64 testcv.d" for win64, then dumping the debug info:
"diadump testcv.exe >dia" yields

...
Function       : static, [00001080][0001:00000080], len = 0000000A,
testcv.replaceToken
                 Function attribute:
                 Function info:
FuncDebugStart :   static, [00001088][0001:00000088]
FuncDebugEnd   :   static, [00001088][0001:00000088]
Data           :   rbp Relative, [00000010], Param, Type: class
testcv.DList!(Token).DList *, tokens
...
UserDefinedType: testcv.DList!(testcv.Token).DList
BaseClass      :   object.Object, offset = 0x0
Data           :   this+0x10, Member, Type: class testcv.Token *, x
UserDefinedType: testcv.DList!(Token).DList
UserDefinedType: _M128A
...

So, the function argument type is referred to as "testcv.DList!(Token).DList",
while the full type description is "testcv.DList!(testcv.Token).DList".

The full qualification of template arguments is sometimes missing.

--


More information about the Digitalmars-d-bugs mailing list