logoalt Hacker News

When the Debugger Lies

56 points • by hasheddan • last Tuesday at 11:02 AM • 17 comments • view on HN

Comments

pletnes • today at 4:34 PM

Reminds me of the time when visual studio would show one value of a variable, but print would show a different one. Never trusted VS again after that.

sharktheone • today at 5:02 PM

Debuggers can lie pretty often. Especially if you are just doing things with ASM. I had some issues with V8 debugging and the debugger just saying that a function got called which for sure wasn't. Even with the option that V8 should emit gdb info :/

Loren_SL • last Tuesday at 6:05 PM

Nice writeup. WinDbg has the same stale-cache trap on live Windows targets.

zavec • today at 1:27 PM

Very cool! I love reading about details like this.

LoganDark • today at 1:23 PM

Once upon a time I had to figure out an issue where I forgot a `return` statement at the end of a non-`void` function, so the C++ compiler happily omitted both RETs for some reason and let the program go straight into illegal instructions. That was fun to debug (not fun, I practically had to single-step through the entire program) because every time this happened the debugger was incredibly confused about what the fuck was going on and nothing made any sense.

➕ show 2 replies