Language Selection

English French German Italian Portuguese Spanish

Using Cscope and SilentBob to analyze source code

Filed under
HowTos

When you start learning the source code of an unfamiliar project, you don't have the knowledge of its structure or the meaning of specific functions, classes, and units in the project. You can use tags to browse for definitions, but it's hard to get an overall picture by just looking through every definition one by one. Cscope and SilentBob are two tools that can help you analyze unfamiliar source code. They help you find symbol definitions, determine where specific functions are used, determine which functions are called by other given functions, and search for strings and patterns throughout the code base. With them, you can save time by doing fast, targeted searches instead of grepping through source files by hand.

Using Cscope

Cscope is a popular utility, and most modern distributions include it. Although Cscope was originally intended only for use with C code, it actually works well with languages like C++ and Java. Cscope comes with an ncurses-based GUI, but it also supports a command-line interface to communicate with other application that can be used as front ends, including major editors such as Emacs and Vim.

SilentBob

SilentBob is another new tool for analyzing source code. It currently supports C/C++, Perl, and Python, but its plugin framework (which is not documented at the moment) enables users to add support for new languages and other features easily.

Full Story.

More in Tux Machines

German Greens want increased support for open source

The Greens in the German parliament want the government to shore up support for open source, but are not sure how. The politicians are working with the Free Software Foundation Europe, to figure out the most convincing arguments and how to increase pressure on the federal government. Read more

Windows Users Download Ubuntu 30,000 Times a Day and Other Cool Facts

Ubuntu is the most used Linux desktop operating system, but that might not be all that transparent, so we would also like to present some interesting figures, like the number of Windows users that download Ubuntu every day. Read more

Mozilla Firefox 37.0.2 Out Now, Fixes Incorrect Rendering of Google Maps

Mozilla pushed today the second maintenance release of its stable Firefox 37.0 web browser to Linux, Windows, and Mac OS X users worldwide, available for download right now via the application’s built-in updater. Read more

Linux-friendly COM Express triplets embed Intel Bay Trail SoCs

When we saw the announcement for the CEM841 COM Express Type 2, we noticed that Axiomtek had already listed two other very similar new COM Express modules — the CEM842 and CEM843 — as “coming soon.” The CEM841 and CEM842 each offers a choice of dual- or quad-core Intel Celeron system-on-chip from the same 22nm Bay Trail generation as the Atom E3845 used by the CEM843. The CEM841 uses the 125 x 95mm COM Express Type 2 Basic format, while the other two modules adopt the 95 x 95mm COM Express Type 6 form factor. The modules specifically support Linux Ubuntu and CentOS, but other mainstream Linux variants should work fine. Read more