Bug 939 – CodeView types for arrays

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2007-02-07T14:23:36Z
Last change time
2019-05-12T15:29:58Z
Assigned to
No Owner
Creator
Jascha Wetzel

Comments

Comment #0 by jascha — 2007-02-07T14:23:36Z
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.
Comment #1 by r.sagitario — 2019-05-12T15:29:58Z
Some ages ago, OEM types have been implemented for OMF, COFF uses specific structs with nested types.