This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
How to interrupt a stepping GDB ?
- From: "Sascha" <sascha at pasalacqua dot de>
- To: <gdb at sourceware dot org>
- Date: Sun, 18 Jun 2006 11:55:19 +0200
- Subject: How to interrupt a stepping GDB ?
Hello,
I've got a question about GDB and the "next/step" command.
Situation:
The debugger stopped at the C instruction:
"for (; a; --a);"
This is a simple loop counting down to zero.
If you "next", GDB will step through that loop until a == 0.
On a local, fast machine this might be okay. But on a (slow) remote target,
stepping a loop like this will take minutes or hours because GDB sends
thousands or even millions of step commands until a == 0;
Now the question: If I notice such a case - how can I interrupt GDB? If I
notice that the stepping would take a long time I'd rather interrupt GDB and
set a breakpoint on the next line. CTRL-C does not work. And waiting hours
or shutting down GDB is no acceptable.
Thanks
Sascha