http://d.puremagic.com/issues/show_bug.cgi?id=4863
Summary: DWARF debug symbols treat arrays as unsigned long long Product: D Version: D2 Platform: x86 OS/Version: FreeBSD Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bugs-purema...@jelal.kn-bremen.de --- Comment #0 from Juergen Lock <bugs-purema...@jelal.kn-bremen.de> 2010-09-13 15:34:38 PDT --- (I haven't checked if this also affects D1, and it probably also affects non-FreeBSD *ixes at least.) I tested both gdb head (checked out after the D patches went in) and Doug Rabson's D-aware debugger ngdb which he annouced as a 'Technology Preview' here: http://lists.freebsd.org/pipermail/freebsd-current/2009-August/011071.html ..and found two things: a) gdb still chokes on dmd -g debug symbols because the D DWARF extensions conflict with DWARF-4: http://d.puremagic.com/issues/show_bug.cgi?id=4180 disabling the DW_TAG_type_unit case in gdb/dwarf2read.c at least makes it no longer complain: http://people.freebsd.org/~nox/tmp/d/d-gdb-dwarf2read.c.patch b) both debuggers treat arrays as unsigned long long (like main()'s standard string[] args) - at least ngdb prints them correctly if I do a manual cast: (ngdb) p *cast(char [][] *)&args I then looked at the debug symbols using readelf -w and found it's actually dmd's fault not the debugger's, the array really seems to be marked as the unsigned long long type: <1><a4>: Abbrev Number: 3 (DW_TAG_base_type) DW_AT_name : unsigned long long DW_AT_byte_size : 8 DW_AT_encoding : 7 (unsigned) .. <2><516>: Abbrev Number: 5 (DW_TAG_formal_parameter) DW_AT_name : args DW_AT_type : <a4> DW_AT_location : 2 byte block: 91 8 (DW_OP_fbreg: 8) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------