Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* stepping past a loop
@ 2005-12-12 11:30 Grazia Russo-Lassner
  2005-12-12 11:35 ` Joel Brobecker
  0 siblings, 1 reply; 2+ messages in thread
From: Grazia Russo-Lassner @ 2005-12-12 11:30 UTC (permalink / raw)
  To: gdb


Hi,

if while debugging I reach a loop that iterates hundreds of times
(for ( int i = 0; i < 500; ++i )  ...)

each time I hit "next" it seems I am going through one iteration at a 
time; instead, I want to skip that loop or not to gothrough every single 
iteration: how would I do that ?

Thank you in advance,

Grazia


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

* Re: stepping past a loop
  2005-12-12 11:30 stepping past a loop Grazia Russo-Lassner
@ 2005-12-12 11:35 ` Joel Brobecker
  0 siblings, 0 replies; 2+ messages in thread
From: Joel Brobecker @ 2005-12-12 11:35 UTC (permalink / raw)
  To: Grazia Russo-Lassner; +Cc: gdb

> if while debugging I reach a loop that iterates hundreds of times
> (for ( int i = 0; i < 500; ++i )  ...)
> 
> each time I hit "next" it seems I am going through one iteration at a 
> time; instead, I want to skip that loop or not to gothrough every single 
> iteration: how would I do that ?

I usually use the "until" command and continue just past the loop.
Another approach is to insert a temporary breakpoint and then "cont".
The GDB documentation should explain how "until" works.

-- 
Joel


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

end of thread, other threads:[~2005-12-12 11:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-12 11:30 stepping past a loop Grazia Russo-Lassner
2005-12-12 11:35 ` Joel Brobecker

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