manpagez: man pages & more
info gdb
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.2 Editing Source Files

To edit the lines in a source file, use the edit command. The editing program of your choice is invoked with the current line set to the active line in the program. Alternatively, there are several ways to specify what part of the file you want to print if you want to see other parts of the program.

Here are the forms of the edit command most commonly used:

edit

Edit the current source file at the active line number in the program.

edit number

Edit the current source file with number as the active line number.

edit function

Edit the file containing function at the beginning of its definition.

edit filename:number

Specifies line number in the source file filename.

edit filename:function

Specifies the line that begins the body of the function function in the file filename. You only need the file name with a function name to avoid ambiguity when there are identically named functions in different source files.

edit *address

Specifies the line containing the program address address. address may be any expression.


© manpagez.com 2000-2024
Individual documents may contain additional copyright information.