Is there a gdb command to finish a loop construct?

前端 未结 2 667
暖寄归人
暖寄归人 2021-02-01 03:27

In gdb, I have the finish command to easily finish execution of a function frame, often when walking through code in the debugger, after looking at a few iterations

2条回答
  •  萌比男神i
    2021-02-01 03:56

    Is there a gdb command to finish a loop construct?

    Execute until on the last line of the loop, or until NNN where NNN is the last line of the loop.

    (gdb) help until
    Execute until the program reaches a source line greater than the current
    or a specified location (same args as break command) within the current frame.
    

    not require a break point to be set and later cleared.

    Temporary breakpoints automatically clear themselves:

    (gdb) help tbreak
    Set a temporary breakpoint.
    Like "break" except the breakpoint is only temporary,
    so it will be deleted when hit.  Equivalent to "break" followed
    by using "enable delete" on the breakpoint number.
    

提交回复
热议问题