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

An introduction to Joplin, an open source Evernote alternative

Joplin is an open source cross-platform note-taking and to-do application. It can handle a large number of notes, organized into notebooks, and can synchronize them across multiple devices. The notes can be edited in Markdown, either from within the app or with your own text editor, and each application has an option to render Markdown with formatting, images, URLs, and more. Any number of files, such as images and PDFs, can be attached to a note, and notes can also be tagged. I started developing Joplin when Evernote changed its pricing model and because I wanted my 4,000+ notes to be stored in a more open format, free of any proprietary solution. To that end, I have developed three Joplin applications, all under the MIT License: for desktop (Windows, MacOS, and Linux), for mobile (Android and iOS), and for the terminal (Windows, MacOS, and Linux). All the applications have similar user interfaces and can synchronize with each other. They are based on open standards and technologies including SQLite and JavaScript for the backend, and Terminal Kit (Node.js), Electron, and React Native for the three front ends. Read more

Open Source OS Still supporting 32-bit Architecture and Why it’s Important

One after the other, Linux distributions are dropping 32-bit support. Or, to be accurate, they drop support for the Intel x86 32-bit architecture (IA-32). Indeed, computers based on x86_64 hardware (IA-64) are superior in every way to their 32-bits counterpart: they are more powerful, run faster, are more compact, and more energy efficient. Not mentioning their price has considerably decreased in just a few years. If you have the opportunity to switch to 64 bits, do it. But, to quote a mail I received recently from Peter Tribble, author of Tribblix: “[… ] in the developed world we assume that we can replace things; in some parts of the developing world older IA-32 systems are still the norm, with 64-bit being rare.” Read more

KDE Applications 17.12 Lands with Dolphin Enhancements, HiDPI Support for Okular

KDE Applications 17.12 has been in development for the past several months and it's now available as a drop-in replacement for the previous series of the software suite, KDE Applications 17.08, which reached end of life in early November. As expected, several of the included apps received various enhancements and new features in this release. Among these, we can mention that the Dolphin file manager is now capable of saving searches, can limit the search only to folders, makes renaming of files easier by allowing the user to simply double-click on the file name, displays extra information about files like origin URL of downloaded file or modification date, and introduces new Bitrate, Genre, and Release Year columns. Read more Also: KDE Applications 17.12 Brings HiDPI Improvements, Rest Of KDE Games Ported To KF5 KDE Ships KDE Applications 17.12.0

Stable kernels 4.14.6 and 4.9.69

Two new stable kernels have been released by Greg Kroah-Hartman: 4.14.6 and 4.9.69. As usual, they contain fixes all over the kernel tree; users of those series should upgrade. Read more See: Linux 4.14.6 and Linux 4.9.69