Hi all,<div><br></div><div>It's been a few years since I last did some real work on DWARF in dmd (v2.044/2.045), other than touching on OS Xes debug info not too long ago.</div><div><br></div><div>At the time I submitted the following enhancement request for the DWARF specification:</div>

<div><br></div><div><a href="http://www.dwarfstd.org/ShowIssue.php?issue=100504.1">http://www.dwarfstd.org/ShowIssue.php?issue=100504.1</a></div><div><br></div><div>I know that some work on debug info has been done since then - does anyone have any input they want to add to this?</div>

<div><br></div><div>Now would be a great time to map out any and all extensions that D needs so they can be included for a future DWARF version.</div><div><br></div><div>You can see the forwarded message below.</div><div>

<br></div><div>Thanks,</div><div><br></div><div>Robert<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Bishop, John E</b> <span dir="ltr"><<a href="mailto:john.e.bishop@intel.com">john.e.bishop@intel.com</a>></span><br>

Date: 26 March 2012 21:11<br>Subject: DWARF issue 100504, "Extensions for D arrays, associative arrays, and delegates"<br>To: "<a href="mailto:robert@octarineparrot.com">robert@octarineparrot.com</a>" <<a href="mailto:robert@octarineparrot.com">robert@octarineparrot.com</a>><br>

<br><br>Robert,<br>
<br>
I'm a member of the DWARF committee.  In our last meeting, I was assigned the task of understanding your proposal and helping to turn it into a formal proposal (with page reference, edit directions and the final formal text).<br>


<br>
If you don't mind, I'd like to know a bit more about the background of the proposal.<br>
<br>
For example, are you working with a compiler, a debugger or both?  Are these concepts core features of D or standard user features (e.g., are they like Fortran COMMON, which is a core feature with important semantics or like Pascal WITH, which is a notational convenience)?  Are these D features primitives (like C++'s "bool") or the result of composition (like "const long long int")?<br>


<br>
As I understand your suggestion, I think it's possible to get the same effect with a smaller change to DWARF.  For example we could add a new attribute and define dynamic array types this way:<br>
<br>
DW_TAG_structure_type                         // A structure<br>
  DW_AT_D_language_dynamic_array_descriptor   // Attribute tells consumer what this is<br>
  DW_AT_name [pointer to "darray"]<br>
  [specification of an size_t named "length"}<br>
  [specification of a T* pointer named "ptr"]<br>
<br>
In other words, as though it were this C code but with the D-language flag added and something useful where I have "...":<br>
<br>
    typedef ... T;<br>
<br>
    typedef struct darray_struct {<br>
        size_t  length;<br>
        T      *ptr;<br>
    } darray;<br>
<br>
Similarly we could add DW_AT_D_language_associative_array and DW_A_D_language_delegate to standard structure definitions.<br>
<br>
Would this simpler proposal work as well for your purposes?<br>
<br>
Thanks for any help you can give me,<br>
<br>
        -John</div>
</div>