wiki:NavigatingInSources

Version 1 (modified by Jakub Jermář, 12 years ago) ( diff )

Navigating in HelenOS sources

Searching and Grepping

Most people coming from the Unix background will be used to working with the grep command. While using plain grep to search HelenOS sources is possible too, Bazaar, the VCS used by HelenOS, provides a nice wrapper around grep, so that it is possible to do for example:

$ bzr grep -n --color=auto foo

This will search all versioned files for the occurrence of string 'foo' and for each match it will print the file, line number and the line itself. The output will be colorized and the matching string will be highlighted.

Another possibility to search the sources is to use cscope.

Indexing the sources

HelenOS main Makefile provides the cscope target, which indexes the source files for later interactive searching and querying:

$ make cscope

The index can be used directly the cscope command:

$ cscope -d

Many text editors provide some sort of a cscope plugin to seamlessly integrate source navigation with the text editor's editing and viewing features.

Note: See TracWiki for help on using the wiki.