Language Selection

English French German Italian Portuguese Spanish

Kernel Debugging Techniques

Filed under
HowTos

Often the pivotal factor in achieving development timetables comes down to one's efficiency in finding and fixing bugs. Debugging inside the Linux kernel can be quite challenging. No matter how you approach it, kernel debugging will always be complex. This chapter examines some of the complexities and presents ideas and methods to improve your debugging skills inside the kernel and device drivers.

Debugging Optimized Kernel Code

At the start of this chapter, we said that one of the challenges identified in debugging kernel code results from compiler optimization. We noted that the Linux kernel is compiled by default with optimization level -O2. In the examples up to this point, we used -O1 optimization to simplify the debugging task. Here we illustrate one of the many ways optimization can complicate debugging.

The related Internet mail lists are strewn with questions related to what appear to be broken tools. Sometimes the poster reports that his debugger is singlestepping backward or that his line numbers do not line up with his source code. Here we present an example to illustrate the complexities that optimizing compilers bring to source-level debugging. In this example, the line numbers that gdb reports when a breakpoint is hit do not match up with the line numbers in our source file due to function inlining.

Full Story.

More in Tux Machines

Open Source History: Why Did Linux Succeed?

One of the most puzzling questions about the history of free and open source is this: Why did Linux succeed so spectacularly, whereas similar attempts to build a free or open source, Unix-like operating system kernel met with considerably less success? I don't know the answer to that question. But I have rounded up some theories, which I'd like to lay out here. First, though, let me make clear what I mean when I write that Linux was a great success. I am defining it in opposition primarily to the variety of other Unix-like operating system kernels, some of them open and some not, that proliferated around the time Linux was born. GNU HURD, the free-as-in-freedom kernel whose development began in May 1991, is one of them. Others include Unices that most people today have never heard of, such as various derivatives of the Unix variant developed at the University of California at Berkeley, BSD; Xenix, Microsoft's take on Unix; academic Unix clones including Minix; and the original Unix developed under the auspices of AT&T, which was vitally important in academic and commercial computing circles during earlier decades, but virtually disappeared from the scene by the 1990s. Read more

Red Hat goes to work on OpenStack network convergence

Red Hat has fully embraced OpenStack’s Neutron in a convergence-targeted virtualisation package. The Linux shop has released Red Hat Virtualisation 4, a package that subtly drops the reference to “Enterprise” held up until and including version 3.5 The intent seems to be for Red Hat’s virtualized Linux stack to become the platform for convergence, as opposed to merely a server density play. Read more

Schools that #GoOpen should #GoOpenSource

The #GoOpen campaign is a terrific first step toward open education. It raises awareness of alternatives to costly and inflexible textbooks and provokes conversations about the nature of curriculum platforms and vendors. But to #GoOpen is to go only part way. Schools with the courage to embrace OER materials can amplify cost savings and student learning when they #GoOpenSource. At Penn Manor School District in Lancaster County, Pennsylvania, Linux and open source software are the foundations for more than 4000 student laptops, classroom computers, and district servers. We've saved hundreds of thousands of dollars by going open source in both the server room and the classroom. However, schools don’t have to take the plunge into desktop Linux all at once. Choosing even one open source upgrade to proprietary software can provide dramatic budget relief. Here are four open source software platforms that saved our district from resorting to bake sales: Read more

Univention Corporate Client 3.0 OS Switches to Unity, Based on Ubuntu 16.04 LTS

Softpedia was informed by Univention's Maren Abatielos about the release and general availability of the Univention Corporate Client (UCC) 3.0 GNU/Linux operating system and management system for thin clients, PCs, or laptop computers. Read more