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

CoreOS' Docker alternative reaches 1.0

Docker Images Are Moving From Ubuntu To Alpine Linux

Docker is reportedly going to be migrating all of their official images from an Ubuntu base to now using Alpine Linux. Alpine Linux is the lightweight distribution built atop musl libc and BusyBox while using a GrSecurity-enhanced Linux kernel. Alpine Linux uses OpenRC as its init system. If you are unfamiliar with this "Small. Simple. Secure." distribution, you can learn more via AlpineLinux.org. The image for Alpine is a mere 5MB. Read more Also: Docker Founders Hire Alpine Linux Developer to Move the Official Images to Ubuntu

Meaning of Convergence, Exploit Excludes Linux

The big news yesterday and even into today was the new Ubuntu tablet, which everyone including Canonical touted as "convergence delivered." Well, today Randall Ross scolds news sites for missing the "timely idea" that is convergence. In other news, security researchers have identified a new exploit that specifically avoids Linux. FOSS Force found that Linux users have no interest in anti-virus software and Phoronix reports on Ubuntu performance over the years. Read more

Tor Browser 5.5.1 Brings a Functional Private Anonymous Browser to Chinese Users

The Tor Project announced today, February 5, 2016, the immediate availability for download of the first point release for the Tor Browser 5.5 anonymous web browser for Linux, Mac OS X, and Microsoft Windows platforms. Read more