Skip to content

Commit

Permalink
bpftool: Fix documentation about line info display for prog dumps
Browse files Browse the repository at this point in the history
The documentation states that when line_info is available when dumping a
program, the source line will be displayed "by default". There is no
notion of "default" here: the line is always displayed if available,
there is no way currently to turn it off.

In the next sentence, the documentation states that if "linum" is used
on the command line, the relevant filename, line, and column will be
displayed "on top of the source line". This is incorrect, as they are
currently displayed on the right side of the source line (or on top of
the eBPF instruction, not the source).

This commit fixes the documentation to address these points.

Signed-off-by: Quentin Monnet <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
  • Loading branch information
qmonnet authored and Alexei Starovoitov committed Apr 6, 2023
1 parent 5af607a commit e27f0f1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tools/bpf/bpftool/Documentation/bpftool-prog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,8 @@ DESCRIPTION
CFG in DOT format, on standard output.

If the programs have line_info available, the source line will
be displayed by default. If **linum** is specified,
the filename, line number and line column will also be
displayed on top of the source line.
be displayed. If **linum** is specified, the filename, line
number and line column will also be displayed.

**bpftool prog dump jited** *PROG* [{ **file** *FILE* | **opcodes** | **linum** }]
Dump jited image (host machine code) of the program.
Expand All @@ -120,9 +119,8 @@ DESCRIPTION
**opcodes** controls if raw opcodes will be printed.

If the prog has line_info available, the source line will
be displayed by default. If **linum** is specified,
the filename, line number and line column will also be
displayed on top of the source line.
be displayed. If **linum** is specified, the filename, line
number and line column will also be displayed.

**bpftool prog pin** *PROG* *FILE*
Pin program *PROG* as *FILE*.
Expand Down

0 comments on commit e27f0f1

Please sign in to comment.