What's wrong with my debugger?
Rainer Schuetze via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Dec 24 01:30:24 PST 2015
On 24.12.2015 03:14, Chris wrote:
> Please see the linked screenshot: http://i.imgur.com/SpkXu5m.png
>
> As you can see, the inside, outside and collision arrays don't seem to
> work with the debugger. They show a bogus lenght and a bogus memory
> address. Extracting the lenghts to separate variables outl, insl and
> coll show that the arrays actually behave properly, though.
>
> Is that a debugger bug? Or maybe something I can fix? Thanks in advance.
>
> DMD 2.069.2, Mago debugger, VisualD 3.43, compiling for 32 bits if that
> makes a difference (can't get either 64 bit compilation or LDC to work)
One possible issue is that there are multiple variable declarations in
the function with the names "outside, inside and collision". Dmd does
not emit proper scope information for variables, so all variables show
up anywhere in a function. (See for example
https://github.com/D-Programming-Language/dmd/pull/2867).
In the locals window, mago displays all instances of variables, but with
the same value (which might be some uninitialized value of a different
declaration than expected). The Visual Studio debug engine shows
different values, though.
More information about the Digitalmars-d-learn
mailing list