Search code examples
gdbcgdb

Execute to Line in GDB


I can execute up to a specific line in GDB by placing a breakpoint there and then pressing c to continue execution.

b <line_number> ; insert breakpoint
c ; run up to the breakpoint
del <breakpoint_number> ; remove breakpoint

Is there a command to run up to a specific line number that will avoid having to run the above sequence of commands?


Solution

  • Still easier is the "until" command, which automatically generates a temporary breakpoint and continues until its location.