[Issue 4863] DWARF debug symbols treat arrays as unsigned long long
http://d.puremagic.com/issues/show_bug.cgi?id=4863 d...@dawgfoto.de changed: What|Removed |Added Status|NEW |RESOLVED CC||d...@dawgfoto.de Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4863] DWARF debug symbols treat arrays as unsigned long long
http://d.puremagic.com/issues/show_bug.cgi?id=4863 --- Comment #2 from Juergen Lock bugs-purema...@jelal.kn-bremen.de 2010-09-14 10:31:30 PDT --- Maybe I was not clear :) The problem is this: % dmd -w -g xzj.d lzma/lzma.d -L-llzma % grep main.\*args xzj.d void main(string[] args) % ngdb.new ./xzj (ngdb) b _Dmain Id Enb AddressWhere 1 y 0x804a077 D main(unsigned long long args): xzj.d:256 ^^^ (ngdb) r foo bar Stopped at breakpoint 1 D main(args=2895955435326537731): xzj.d:256 = 259*// --debug (ngdb) p *cast(char [][] *)args $0 = (char[][]) [./xzj, foo, bar] (ngdb) q (same with the patched gdb only that doesn't understand the cast.) And meanwhile I found out this doesn't happen always: % cat args.d import std.stdio; void main(string[] args) { foreach(arg; args) writeln(arg); } % dmd -g -w args.d % ngdb.new ./args (ngdb) b _Dmain Id Enb AddressWhere 1 y 0x80491fb D main(char[][] args): args.d:5 (ngdb) r foo bar Stopped at breakpoint 1 D main(args=[./args, foo, bar]): args.d:5 = 5*foreach(arg; args) (ngdb) q So now I probably should extract the most simple testcase that exhibits the bug, I haven't done that yet so for now here are links to the xzj source: http://people.freebsd.org/~nox/tmp/d/xzj.d http://people.freebsd.org/~nox/tmp/d/lzma.d -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4863] DWARF debug symbols treat arrays as unsigned long long
http://d.puremagic.com/issues/show_bug.cgi?id=4863 --- Comment #3 from Juergen Lock bugs-purema...@jelal.kn-bremen.de 2010-09-14 11:06:33 PDT --- And btw I can confirm Linux is affected too: % readelf -w linux/xzj .. 16bb: Abbrev Number: 3 (DW_TAG_base_type) DW_AT_name: unsigned long long DW_AT_byte_size : 8 DW_AT_encoding: 7 (unsigned) .. 211c1: Abbrev Number: 6 (DW_TAG_formal_parameter) DW_AT_name: args DW_AT_type: 6bb DW_AT_location: 2 byte block: 91 8 (DW_OP_fbreg: 8) vs. % readelf -w linux/args 162: Abbrev Number: 3 (DW_TAG_base_type) DW_AT_name: char DW_AT_byte_size : 1 DW_AT_encoding: 8 (unsigned char) 16a: Abbrev Number: 4 (Unknown TAG value: 41) DW_AT_byte_size : 8 DW_AT_type: 62 170: Abbrev Number: 4 (Unknown TAG value: 41) DW_AT_byte_size : 8 DW_AT_type: 6a .. 2a5: Abbrev Number: 5 (DW_TAG_formal_parameter) DW_AT_name: args DW_AT_type: 70 DW_AT_location: 2 byte block: 91 8 (DW_OP_fbreg: 8) I've put the binaries here: http://people.freebsd.org/~nox/tmp/d/linux/xzj http://people.freebsd.org/~nox/tmp/d/linux/args -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4863] DWARF debug symbols treat arrays as unsigned long long
http://d.puremagic.com/issues/show_bug.cgi?id=4863 --- Comment #4 from Juergen Lock bugs-purema...@jelal.kn-bremen.de 2010-09-14 15:48:14 PDT --- Created an attachment (id=756) reduced testcase that exhibits the bug Ok I have a minmal testcase now, all it took was a local variable: % readelf -w linux/argsfoo .. 17c: Abbrev Number: 3 (DW_TAG_base_type) DW_AT_name: unsigned long long DW_AT_byte_size : 8 DW_AT_encoding: 7 (unsigned) .. 2c1: Abbrev Number: 5 (DW_TAG_formal_parameter) DW_AT_name: args DW_AT_type: 7c 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: ---
[Issue 4863] DWARF debug symbols treat arrays as unsigned long long
http://d.puremagic.com/issues/show_bug.cgi?id=4863 nfx...@gmail.com changed: What|Removed |Added CC||nfx...@gmail.com --- Comment #1 from nfx...@gmail.com 2010-09-13 19:10:50 PDT --- I think dmd uses ulong for arrays internally. All the array runtime functions in lifetime.d (Tango/druntime) actually return array descriptors as ulong! -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---