www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 939] New: CodeView types for arrays


           Summary: CodeView types for arrays
           Product: D
           Version: 1.005
          Platform: PC
               URL: http://ddbg.mainia.de
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: jascha mainia.de

DMD marks arrays as 64bit integers and associative arrays as void-pointer.

As discussed in the newsgroup, new CodeView types could be defined for D aware
debuggers as follows:

Dynamic (integer indexed) arrays could be marked with type 0x0017, which is the
first unused leaf index in the 16bit NB09 CodeView specs. The type leaf needs
to include the type of the array's elements. Therefore, it could look like this
(the first number indicates the size in bytes):
2    LF_DYN_ARRAY (define as 0x0017)
2     elemtype

elemtype is the type index of the array's value type.

For associative arrays the leaf could accordingly have this format:
2    LF_ASSOC_ARRAY (define as 0x0018)
2     elemtype
2     keytype

Alternatively, if the 32bit NB09 CodeView specs (MSDN Library January 2000)
would be used, one could reuse the "(0x100b) Basic Array" type for dynamic
arrays and "(0x100c) Multiply Dimensioned Array" for associative arrays. But
that would also mean to implement a lot more from that spec.

Feb 07 2007