5 ms·
> debuggers will often lie to you, and you often have to look into the registers for the real data What do you mean by this?
by jnordwick 10y ago
> debuggers will often lie to you, and you often have to look into the registers for the real data
What do you mean by this?
- gambiting 10y agoWell I don't know what OP meant, but I work in games programming, and the PS4 debugger will frequently lie to you in visual studio. You hover over a variable and it's just giving you a completely wrong value, which is correct if you look directly into memory window or assembly view. I wouldn't consider this to be a very common use case though, it's a niche within niche.
- SticksAndBreaks 10y agoIts that way in all the niches, which makes it a set of all niches ==> mainstream thing.
- duncanawoods 10y agoOptimised C++ sure but you don't see this issue with C#. If you are using a high-level language that does not have a reliable debugger, time to change language.
- ska 10y agoOne of the things that happens here is the more static and optimized a compiler output is, the harder it is to do source level debugging. Conversely, more dynamic, less optimized languages are easier to write and verify debuggers for. This isn't a strict ordering, of course, but a general trend. Unfortunately, the very aspect that make some languages easier to debug make them poor at some of the applications you might want the former for (cf C# and c++ as you bring up). Luckily debugging is not merely the act of using a debugger !
- pjmlp 10y agoI imagine this situation might surface when looking at optimized native code, either from JIT or AOT, for example via WinDbg sos plugin for .NET. Still not a reason enough to avoid using a debugger.
- SticksAndBreaks 10y agoDebuggers sometimes simply write wrong values into those nice gui-windows- do not update the values they show, or just dont inform the reader that the value ceased to exist- at all.
- jnordwick 10y agoOh, so a bug in the debugger basically. Speaking of the registers it sounded like he was talking about some weird cache incoherency issue that shouldn't conceivably exist (on x86 at least).
- deleted 10y ago[deleted]