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