This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]