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: gdb behavior on tight loop


> >> Please see the gdb session below. When I run "next" on line 5, the tight
> >> loop, it will take several seconds before gdb stop on line 6 and I regain
> >> control. 
> >>
> >> If I set an additional breackpoint on line 6, and "continue" on line 5 instead
> >> of "next", everything looks good.

In situations like this, the "until" command is convenient.
You can say "u 6" and gdb will set a temporary breakpoint at line 6,
run the program at full speed until it hits that breakpoint (or some
other breakpoint or error) and then remove the temporary breakpoint.

	John Gilmore


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