goto subcommand for dbx: Run a specified source line

Format

goto sourceline

Description

The goto subcommand causes the specified source line to be run next. Typically, the source line must be in the same function as the current source line. To override this restriction, use the set subcommand with the $unsafegoto variable.

Usage notes

  • The goto subcommand can be run only while the dbx debug program is running.
  • While dbx allows the changing of the next instruction to be run, unpredictable results might occur in the program being debugged. Whether the unpredictable results occur depends on where the program is currently stopped, the current state of the program, and where the program is to resume running.

Examples

To change the next line to be executed to line 6, enter:
goto 6

Related information

The cont, gotoi, and set subcommands.