param_key: fix container of when no struct member is referenced
[smatch.git] / semind.1
blob44e79346644d5d5aef94a8683bf3c26bdf0e28e0
1 .\" Sindex manpage by Alexey Gladkov
2 .TH semind "1"
4 .SH NAME
5 semind \- Semantic Indexer for C
7 .SH SYNOPSIS
8 .B semind
9 [\fIoptions\fR]
10 .br
11 .B semind
12 [\fIoptions\fR] \fIadd\fR [\fIcommand options\fR] [\fI--\fR] [\fIcompiler options\fR] [\fIfiles...\fR]
13 .br
14 .B semind
15 [\fIoptions\fR] \fIrm\fR [\fIcommand options\fR] \fIpattern\fR
16 .br
17 .B semind
18 [\fIoptions\fR] \fIsearch\fR [\fIcommand options\fR] [\fIpattern\fR]
19 .br
20 .B semind [\fIoptions\fR] \fIsearch\fR [\fIcommand options\fR] (\fI-e\fR|\fI-l\fR) \fIfilename\fR:\fIlinenr\fR:\fIcolumn\fR
21 .br
22 .SH DESCRIPTION
24 semind is the simple to use cscope-like tool based on sparse/dissect.  Unlike
25 cscope it runs after pre-processor and thus it can't index the code filtered out
26 by ifdef's, but otoh it understands how the symbol is used and it can track the
27 usage of struct members.
29 .SH SUBCOMMANDS
30 .TP
31 \fBadd\fR
32 generates or updates semantic index file.
33 .TP
34 \fBrm\fR
35 removes files from the index by \fIpattern\fR. The \fIpattern\fR is a
36 .BR glob (7)
37 wildcard pattern.
38 .TP
39 \fBsearch\fR
40 queries information about symbol by \fIpattern\fR. The \fIpattern\fR is a
41 .BR glob (7)
42 wildcard pattern.
44 .SH COMMON OPTIONS
45 .TP
46 \fB-D\fR, \fB--database=FILE\fR
47 specify database file (default: ./semind.sqlite).
48 .TP
49 \fB-v\fR, \fB--verbose\fR
50 show information about what is being done.
51 .TP
52 \fB-h\fR, \fB--help\fR
53 show this text and exit.
55 .SH ADD OPTIONS
56 .TP
57 \fB--include-local-syms\fR
58 include into the index local symbols.
60 .SH SEARCH OPTIONS
61 .TP
62 \fB-f\fR, \fB--format=STRING\fR
63 specify an output format. Default: '(%m) %f\\t%l\\t%c\\t%C\\t%s' (see
64 .BR FORMAT
65 below).
66 .TP
67 \fB-p\fR, \fB--path=PATTERN\fR
68 search symbols only in specified directories.
69 .TP
70 \fB-m\fR, \fB--mode=MODE\fR
71 search only the specified type of access (see
72 .BR MODE
73 below).
74 .TP
75 \fB-k\fR, \fB--kind=KIND\fR
76 specify a kind of symbol (see
77 .BR KIND
78 below).
79 .TP
80 \fB-e\fR, \fB--explain\fR
81 Show what happens in the specified file position;
82 .TP
83 \fB-l\fR, \fB--location\fR
84 Show usage of symbols from a specific file position;
85 .TP
86 \fB-v\fR, \fB--verbose\fR
87 show information about what is being done;
88 .TP
89 \fB-h\fR, \fB--help\fR
90 show this text and exit.
92 .SH FORMAT
93 .TP
94 \fB%m\fR
95 access mode in human readable form (see
96 .BR MODE
97 below).
98 .TP
99 \fB%f\fR
100 file name.
102 \fB%l\fR
103 line number.
105 \fB%c\fR
106 column number.
108 \fB%C\fR
109 the name of the function in which the symbol occurs.
111 \fB%n\fR
112 symbol name.
114 \fB%s\fR
115 source code line. Indexer does not save source code lines. They are read from
116 the file during the search.
118 .SH KIND
120 \fBf\fR
121 function
123 \fBs\fR
124 strict
126 \fBm\fR
127 struct member
129 .SH MODE
130 The \fBMODE\fR is dumped as a 3-letter string. The first letter denotes address
131 of part, 2-nd - access by value, 3-rd - access by pointer. A special
132 value '\fIdef\fR' means a symbol definition.
134 \fBr\fR
135 read
137 \fBw\fR
138 write
140 \fBm\fR
141 read and write
143 .SH SEE ALSO
144 .BR sparse (1)
146 .SH HOMEPAGE
147 https://sparse.docs.kernel.org
149 .SH MAILING LIST
150 linux-sparse@vger.kernel.org