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 220 Monday, October 7, 2002 9:12 PM<br />

220 Chapter 7 • Miscellaneous Tools<br />

Figure 7-2 List of files with symbol msg.<br />

As you can see, there are five files listed in the top part of the screen that contain this symbol.<br />

This listing contains five columns as below:<br />

1. Number of row, starting with zero.<br />

2. File name that contains the symbol.<br />

3. Function name where symbol is used. If the symbol is not inside a function, it is<br />

marked as global.<br />

4. Line number where symbol is present in that file.<br />

5. <strong>The</strong> line showing the definition or use of the symbol.<br />

You can move the cursor to a particular line <strong>and</strong> press the Enter key to edit that file. By<br />

default the file is opened in vi editor. However, you can configure to use an editor of your choice.<br />

To move back to the bottom part of the screen to search for another symbol, you can use the Tab<br />

key. Use the Ctrl+D key combination to quit the program.<br />

<strong>The</strong> utility is also very useful if you want to find non-utilized code in a software project.<br />

For example, if a function is present in the source code but never used anywhere in the project, it<br />

can be detected using cscope. It is also useful when you want to modify a particular symbol<br />

throughout the source code tree. Common options used with cscope are listed in Table 7-3.

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

Saved successfully!

Ooh no, something went wrong!