Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* [NEWBIE] How to exit from a loop
@ 2008-06-30 15:32 Stefano Sabatini
  2008-06-30 15:36 ` Andreas Schwab
  2008-06-30 15:36 ` Daniel Jacobowitz
  0 siblings, 2 replies; 3+ messages in thread
From: Stefano Sabatini @ 2008-06-30 15:32 UTC (permalink / raw)
  To: gdb Mailing List

Hi all,

suppose I'm debugging some code like this:

int i;
for (i=0; i < a_big_number; i++)
    do_something(i);

out_of_the_loop:
    do_something_else();

and I'd like to jump out of the loop.

What I did everytime is to simply put a breakpoint just after
out_of_the_loop and hit continue, then I need to unset the breakpoint.

I wonder if there is a more efficient way to exit from the loop,
without the need to set a breakpoint at the rigth place, continue and
then unset the breakpoint but with just a single command/macro.

Many thanks in advance, regards.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-06-30 15:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-30 15:32 [NEWBIE] How to exit from a loop Stefano Sabatini
2008-06-30 15:36 ` Andreas Schwab
2008-06-30 15:36 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox