f78
Printing source lines
By default, GDB prints ten source lines with any of these forms of the
Repeating a
In general, the
The following are the ways of specifying a single source line—all the kinds of
linespec.
filename:function
Print lines centered around line number, linenum, in the current source file.
Print lines centered around the beginning of function, function.
Print more lines. If the last lines printed were printed with a list command, this prints lines following the last lines printed; however, if the
last line printed was a solitary line printed as part of displaying a stack
frame (see Examining the Stack), this prints lines centered around that line.
Print lines just before the lines last printed.
Make the list command display count source lines (unless the list argument explicitly specifies some other number).
Display the number of lines that list prints.
Print lines centered around the line specified by linespec.
Print lines from first to last. Both arguments are linespecs.
Print lines ending with last.
Print lines starting with first.
Print lines just after the lines last printed.
Print lines just before the lines last printed.
As described for list in the previous descriptions.
Specifies line number of the current source file. When a list command has two linespecs, this refers
to the same source file as the first linespec.
Specifies the line offset lines after the last line printed. When used as the second linespec in a list
command that has two, this specifies the line offset lines down from the first linespec.
Specifies the line offset lines before the last line printed.
Specifies line number in the source file, filename.
Specifies the line that begins the body of the function, function. For instance, in C, this is the line with the open brace.
Specifies the line of the open-brace 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.
Specifies the line containing the program address, address. address may be any expression.