Debugging Embedded Linux

Christopher Hallinan · 2007

No matter how you approach it, Linux debugging will always be complex. The first part of this Short Cut examines some of these complexities as they relate to kernel debugging and present ideas and methods to improve your debugging skills, inside the kernel itself and then inside device drivers. You begin by learning to use Kernel GNU Debugger (KGDB) to probe the kernel. But because you cannot debug very early kernel startup code with KGDB, we also show you how to work with a hardware debug probe. For the examples in this section, we use a unit manufactured by Abatron called the BDI-2000. Hardware debug probes are often called JTAG probes, because they use a low-level communications method first employed for boundary scan testing of integrated circuits defined by the Joint Test Action Group (JTAG). i¾ i¾ i¾ i¾ i¾ i¾ i¾ i¾ i¾ i¾ i¾ In the second part of this Short Cut, we continue our coverage of GDB for debugging application code in user space. We extend our coverage of remote debugging and the tools and techniques used for this peculiar debugging environment.This Short Cut includes Chapters 14 and 15 from the book Embedded Linux Primer by Christopher Hallinan (0-13-167984-8). As such, it contains references to earlier and later chapters that are not included in this Short Cut. Apart from these references, the Short Cut is fully self-contained and is an excellent choice for embedded Linux developers interested in learning both kernel-level and application-level debugging techniques.Kernel Debugging Techniques14.1i¾ i¾ i¾ i¾ Challenges to Kernel Debuggingi¾ i¾ i¾ i¾ 414.2i¾ i¾ i¾ i¾ Using KGDB for Kernel Debuggingi¾ i¾ i¾ i¾ 6i¾ i¾ i¾ i¾ i¾ 14.3i¾ i¾ i¾ i¾ Debugging the Linux Kerneli¾ i¾ i¾ i¾ 14i¾ 14.4i¾ i¾ i¾ i¾ Hardward-Assisted Debuggingi¾ i¾ i¾ i¾ 5314.5i¾ i¾ i¾ When It Doesn't Booti¾ i¾ i¾ i¾ 6314.6i¾ i¾ i¾ Chapter Summaryi¾ i¾ i¾ i¾ 69Debugging Embedded Linux Applications15.1i¾ i¾ i¾ Target Debuggingi¾ i¾ i¾ i¾ 7215.2i¾ i¾ i¾ Remote (Cross) Debuggingi¾ i¾ i¾ i¾ 7315.3i¾ i¾ i¾ Debugging with Shared Librariesi¾ i¾ i¾ i¾ 8015.4i¾ i¾ i¾ Debugging Multiple Tasksi¾ i¾ i¾ i¾ 8715.5i¾ i¾ i¾ Additional Remote Debug Optionsi¾ i¾ i¾ i¾ 9715.6i¾ i¾ i¾ Chapter Summaryi¾ i¾ i¾ i¾ 99

Read the paper · More papers on PaperTik