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

What will 2015 bring for the open source cloud?

Regardless of what we see in 2015, the open source cloud will continue to grow, change, and adapt. What is your top prediction for this year? Read more

Five Great Applications For Systems Admins

Being a systems administrator is a difficult, often thankless job. You’re one of the people responsible for keeping the entire IT infrastructure of your business up and running. What that means is that whenever something doesn’t work the way it should, all eyes immediately turn in your direction. You can hardly be blamed for looking to make your life a bit easier. I’d actually recommend that you do so, truth be told. The less time you spend slogging through all the basics of administration, the more time you can devote to improving your server. To that end, I’ve compiled a list of a few of the best sysadmin apps on the web; tools that any Linux administrator worth their salt should consider using. Read more

today's leftovers

Sdparm & ddpt Linux Disk Utilities Updated

For those out of the loop, sdparm allows for setting and getting SCSI device parameters. The ddpt utility is yet another spin-off of dd but with extra features regarding storage control. Both ddpt and sdparm work on not only Linux but also BSDs, Solaris, and even Windows. Read more