My Debugger is lying to me
02.11.08 - 04:31am
I’ve been trying to figure out why the string being passed to XPCOMGlueStartup (and subsequently XPCOMGlueLoad) was “disappearing.” Turns out it wasn’t. My debugger just couldn’t see it. As you can see from this screen shot, when I decided to print the content of the variable to stdout (mostly to prove to myself that I’m not going insane), it turns out that the string is there. Visual Studio just decided to waste 3 hours of my life (thank you M$).


I can see that you put a breakpoint on the brace. If you had put it on the printf line instead, do you still get the error? GDB did something like that to me: if I stepped in the function, all the locals changed to wrong values. If the breakpoint was on the first statement instead, the locals remained correct.
(No, I wasn’t working on Mozilla code…)