# semind

## NAME



           semind - Semantic Indexer for C
    


## SYNOPSIS



           **semind**[_options_]
           **semind**[_options_] _add_ [_command options_] [_--_] [_compiler options_]
           [_files..._]
           **semind**[_options_] _rm_ [_command options_] _pattern_
           **semind**[_options_] _search_ [_command options_] [_pattern_]
           **semind [**_options_] _search_ [_command options_] (_-e_ |_-l_)
           _filename_ :_linenr_ :_column_
    


## DESCRIPTION



           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.
    


## SUBCOMMANDS



           **add** generates or updates semantic index file.
    
           **rm** removes files from the index by _pattern_. The _pattern_ is a
                  glob(7) wildcard pattern.
    
           **search** queries information about symbol by _pattern_. The _pattern_ is
                  a glob(7) wildcard pattern.
    


## COMMON OPTIONS



           **-D** , **--database=FILE**
                  specify database file (default: ./semind.sqlite).
    
           **-v** , **--verbose**
                  show information about what is being done.
    
           **-h** , **--help**
                  show this text and exit.
    


## ADD OPTIONS



           **--include-local-syms**
                  include into the index local symbols.
    


## SEARCH OPTIONS



           **-f** , **--format=STRING**
                  specify an output format. Default: '(%m)
                  %f\t%l\t%c\t%C\t%s' (see **FORMAT** below).
    
           **-p** , **--path=PATTERN**
                  search symbols only in specified directories.
    
           **-m** , **--mode=MODE**
                  search only the specified type of access (see **MODE** below).
    
           **-k** , **--kind=KIND**
                  specify a kind of symbol (see **KIND** below).
    
           **-e** , **--explain**
                  Show what happens in the specified file position;
    
           **-l** , **--location**
                  Show usage of symbols from a specific file position;
    
           **-v** , **--verbose**
                  show information about what is being done;
    
           **-h** , **--help**
                  show this text and exit.
    


## FORMAT



           **%m** access mode in human readable form (see **MODE** below).
    
           **%f** file name.
    
           **%l** line number.
    
           **%c** column number.
    
           **%C** the name of the function in which the symbol occurs.
    
           **%n** symbol name.
    
           **%s** source code line. Indexer does not save source code lines.
                  They are read from the file during the search.
    


## KIND



           **f** function
    
           **s** strict
    
           **m** struct member
    


## MODE



           The **MODE** 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 '_def_ ' means a symbol definition.
    
           **r** read
    
           **w** write
    
           **m** read and write
    


## HOMEPAGE



           https://sparse.docs.kernel.org
    


## MAILING LIST



           linux-sparse@vger.kernel.org
    


* * *