edit subcommand for dbx: Invoke an editor

Format

edit [procedure | file]

Description

The edit subcommand invokes an editor on the specified file. The file can be specified through the file argument or through the procedure argument (in which case the editor is invoked on the file containing that procedure). If no file is specified, the editor is invoked on the current source file. The default editor is the ed editor. Override the default by resetting the EDITOR environment variable to the name of the desired editor.

Usage notes

Examples

  1. To invoke an editor on the current source file, enter:
    edit
  2. To invoke an editor on the main.c file, enter:
    edit main.c
  3. To invoke an editor on the file containing the do_count procedure, enter:
    edit do_count

Related information

The ed editor.

The list subcommand for the dbx command.