This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: stepping past a loop
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Grazia Russo-Lassner <glassner at umiacs dot umd dot edu>
- Cc: gdb at sources dot redhat dot com
- Date: Mon, 12 Dec 2005 12:35:39 +0100
- Subject: Re: stepping past a loop
- References: <Pine.GSO.4.61.0512120628070.15423@trifle.umiacs.umd.edu>
> 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