edit (idb mode only)

Edit the current source file or a specified file.

Syntax

edit [filename]

Parameters

filename

The name of the file to edit.

Description

This command invokes the editor defined by the EDITOR environment variable.

The debugger passes the editor the file name to edit using filename. If you do not specify filename, the editor opens the current file. If no current file exists, the editor opens without a file.

If the EDITOR environment variable is undefined, the debugger invokes the vi editor.

Example

The following example opens the file chars.c in the Emacs* editor:

(idb) sh printenv EDITOR
emacs 
(idb) file
chars.c 
(idb) edit

The following example opens the file ~/foo/bar.f in the nedit editor:

(idb) sh printenv EDITOR
nedit 
(idb) edit ~/foo/bar.f

See Also


Submit feedback on this help topic

Copyright © 1996-2010, Intel Corporation. All rights reserved.