How do I get GDB to break out of a loop?

John Carter picture John Carter · Feb 4, 2010 · Viewed 36k times · Source

I can tell GDB to return from a function immediately with return, and call a function with call myFunction.

But how do I get it break out of the current loop? i.e. to act as if it's hit a break; statement.

Is jump myfile.c:<linenumber> the way to do this?

Answer

sigjuice picture sigjuice · Feb 4, 2010

jump looks like what you want. See Continuing at a Different Address