www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9800] New: Numerous issues with DWARF debug output


           Summary: Numerous issues with DWARF debug output
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: kodlists-dlang yahoo.com

--- Comment #0 from Sarath Kumar Kodali <kodlists-dlang yahoo.com> 2013-03-23
10:44:08 PDT ---
The compiler does not generate correct DWARF tags or attributes when compiled
with -g. The following issues were observed.

1. enum : type is not represented as DW_TAG_enumeration_type
2. enum values are not represented.
3. arrays are represented as DW_TAG_structure_type instead of DW_TAG_array_type
4. strings are represented as DW_TAG_base_type + DW_ATE_unsigned instead of
5. shared types are represented as DW_TAG_volatile_type instead of
6. DW_AT_external is set even for static types
7. symbols within a module are not children of DW_TAG_module
8. module name should be removed from global symbols if they are made children
of module
9. classes are represented as DW_TAG_structure_type instead of
10. member functions are not represented as children of the aggregate, stuct or
11. DW_AT_linkage_name should be used instead of DW_AT_MIPS_linkage_name
12. DW_TAG_decl_file and DW_TAG_decl_line are not produced for any symbol other
than DW_TAG_subprogram
13. For reference types DW_TAG_pointer_type is used instead of
14. C type names are produced for DW_TAG_base_type instead of D type names (eg.
_Bool, wchar_t, unsigned char)
15. string, wstring and dstring are all represented as same type, i.e.
"unsigned long long"
16. Annonymous unions are not represented.
17. aliases are not represented.
18. function arguments are represented in reverse order. due to this, the
arguments will be shown by debugger in reverse order
       void foo(int i, float f) {}
       void main() { foo(1, 1.2); } <-- this will be shown as foo(f=1.2, i=1)
by debugger.
    If we have a overloaded foo(float, int), it will confuse the user.
19. DW_AT_pure should be emitted for pure functions. This will enable the
debugger to issue a warning if impure fucntions are invoked from the debugger.
20.  property is not represented. Maybe we can use DW_AT_elemental ???
21. DW_AT_main_subprogram should be emitted for _Dmain, so that the debugger
knows that it is the starting function instead of main()

Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 23 2013