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

Plasma 5.12.5 bugfix update for Kubuntu 18.04 LTS – Testing help required

Are you using Kubuntu 18.04, our current LTS release? We currently have the Plasma 5.12.5 LTS bugfix release available in our Updates PPA, but we would like to provide the important fixes and translations in this release to all users via updates in the main Ubuntu archive. This would also mean these updates would be provide by default with the 18.04.1 point release ISO expected in late July. Read more

New Arduino boards include first FPGA model

Arduino launched a “MKR Vidor 4000” board with a SAMA21 MCU and Cyclone 10 FPGA, as well as an “Uno WiFi Rev 2” with an ATmega4809 MCU. Both boards have a crypto chip and ESP32-based WiFi module. In conjunction with this weekend’s Maker Faire Bay Area, Arduino launched two Arduino boards that are due to ship at the end of June. The MKR Vidor 4000 is the first Arduino board equipped with an field programmable . The Intel Cyclone 10 FPGA. will be supported with programming libraries and a new visual editor. The Arduino Uno WiFi Rev 2, meanwhile, revises the Arduino Uno WiFi with a new Microchip ATmega4809 MCU. It also advances to an ESP32-based u-blox NINA-W102 WiFi module, which is also found on the Vidor 4000. Read more

DragonFlyBSD 5.3 Works Towards Performance Improvements

Given that DragonFlyBSD recently landed some SMP performance improvements and other performance optimizations in its kernel for 5.3-DEVELOPMENT but as well finished tidying up its Spectre mitigation, this weekend I spent some time running some benchmarks on DragonFlyBSD 5.2 and 5.3-DEVELOPMENT to see how the performance has shifted for an Intel Xeon system. Read more

Red Hat News: KVM, OpenStack Platform 13 and More