[Issue 4863] DWARF debug symbols treat arrays as unsigned long long

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Sep 14 10:32:01 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4863



--- Comment #2 from Juergen Lock <bugs-puremagic at 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 Address            Where
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 Address            Where
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: -------


More information about the Digitalmars-d-bugs mailing list