Step Continue running your program until control reaches a different source line, then stop it and return control to GDB. A typical technique for using stepping is to set a breakpoint (see ) at the beginning of the function or the section of your program where a problem is believed to lie, run your program until it stops at that breakpoint, and then step through the suspect area, examining the variables that are interesting, until you see the problem happen. To resume execution at a different place, you can use return (see ) to go back to the calling function or jump (see ) to go to an arbitrary location in your program. The synonyms c and fg (for foreground, as the debugged program is deemed to be the foreground program) are provided purely for convenience, and have exactly the same behavior as continue. At other times, the argument to continue is ignored. The argument ignore-count is meaningful only when your program stopped due to a breakpoint. The optional argument ignore-count allows you to specify a further number of times to ignore a breakpoint at this location its effect is like that of ignore (see ). (If it stops due to a signal, you may want to use handle, or use ‘ signal 0’ to resume execution (see ), or you may step into the signal’s handler (see ).) continue c fg Resume program execution, at the address where your program last stopped any breakpoints set at that address are bypassed. Either when continuing or when stepping, your program may stop even sooner, due to a breakpoint or a signal. In contrast, stepping means executing just one more “step” of your program, where “step” may mean either one line of source code, or one machine instruction (depending on what particular command you use). Next:, Previous:, Up: 5.2 Continuing and Stepping Continuing means resuming program execution until your program completes normally.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |