digitalmars.D.learn - What's wrong with my debugger?
- Chris (11/11) Dec 23 2015 Please see the linked screenshot: http://i.imgur.com/SpkXu5m.png
- Rainer Schuetze (10/18) Dec 24 2015 One possible issue is that there are multiple variable declarations in
- Chris (4/8) Dec 24 2015 Hi, thanks for the reply but not actually, no, if I change the
- Rainer Schuetze (3/10) Dec 27 2015 I suspect that the variables are part of a closure. There is bad and
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)
Dec 23 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.
Dec 24 2015
On Thursday, 24 December 2015 at 09:30:24 UTC, Rainer Schuetze wrote: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.Hi, thanks for the reply but not actually, no, if I change the debug engine to VS and rebuild I get the same behaviour.
Dec 24 2015
On 24.12.2015 14:57, Chris wrote:On Thursday, 24 December 2015 at 09:30:24 UTC, Rainer Schuetze wrote:I suspect that the variables are part of a closure. There is bad and incomplete debug information emitted by dmd in this case.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.Hi, thanks for the reply but not actually, no, if I change the debug engine to VS and rebuild I get the same behaviour.
Dec 27 2015