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]

Re: stepping past a loop


> 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


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