I’ve yet to find a good resource for debugging RELEASE mode binaries or dumps in windbg.
I understand that debugging becomes more limited with compiler optimization enabled. But sometimes I don’t have a choice–for example, crash dump analysis on a non-reproducible issue.
It’d be really nice if there were some write-up that describes what IS possible (or what to watch out for) with release binaries. Does anyone know of such a resource?
I’m looking for something like this, but with much more detail. I was hoping Advanced Windows Debugging would have something on it, but no such luck.
If you have PDBs, most things are possible (I debugged Windows OS DLLs solely in release mode for years!).
The thing to realize is that WinDbg will now lie to you far more often – that is, it will display what it sees, which is not always what the actual value is. For example, if you try to run
dvon frame 15 on amd64, there is no way that the values displayed will be accurate, since the compiler stored the info in a register.The other difference, is that functions will now be inlined, so the last stack of the frame may not be the actual last frame, it may be a small function that has been copy-pasted into the bigger function.