My Debugger is lying to me

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$).

lying debugger

The Conversation {1 comments}

  1. Francis Gagné {Monday February 11, 2008 @ 8:59 pm}

    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…)

Speak Your Peace

  • Comment Policy:Could go here if there's a nagging need Login Instructions: Would go here if there's a desire.
Close
E-mail It