01.09.2014 Views

The Linux Development Platform Configuring, Using, and ... - Classes

The Linux Development Platform Configuring, Using, and ... - Classes

The Linux Development Platform Configuring, Using, and ... - Classes

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CH07.fm Page 219 Monday, October 7, 2002 9:12 PM<br />

<strong>Using</strong> cscope <strong>and</strong> cbrowser 219<br />

7.4 <strong>Using</strong> cscope <strong>and</strong> cbrowser<br />

<strong>The</strong> cscope is a very useful utility to browse through the source code tree of a large project. It<br />

was originally written by Santa Cruz Operations <strong>and</strong> made public later on. You can download it<br />

from http://cscope.sourceforge.net. For <strong>Linux</strong>, it is available in RPM format as well.<br />

It is a text-mode screen-oriented utility. When you start it using the cscope comm<strong>and</strong>,<br />

the initial screen looks like the one shown in Figure 7-1.<br />

When invoked, cscope first creates its symbol file cscope.out in the current directory<br />

that contains a reference to symbols in source code files. This reference is generated from<br />

files with the extensions .c <strong>and</strong> .h. You can also use comm<strong>and</strong> line options to create this symbol<br />

file from a particular type of source code files.<br />

<strong>The</strong> bottom part of the screen shows options that can be used to look up a symbol in the<br />

source code. <strong>The</strong> cursor is blinking at the first option <strong>and</strong> can be moved to other options using<br />

arrow keys. For example, if you want to look up symbol “msg” in all source code files, just type<br />

it in at the first line <strong>and</strong> press the Enter key. You will see a listing of files containing this symbol<br />

as shown in Figure 7-2.<br />

Figure 7-1 <strong>The</strong> cscope initial screen.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!